PDA

View Full Version : Passing String



FrymanTCU
06-18-2008, 11:47 AM
Okay, I've tried almost every article I can find but I really just have no clue what I'm doing. There is a Put() and Let() function in VB that I have tried, I tried DarkSprout's mdl_PublicVariables... All I want to do is carry the information from one form to another and then use that infomation as the filter in the second form. I did not build the filter I figure if someone could pass the variable to the text box I could figure it out from there. Please help, thanks in advance.

-Rich

OBP
06-18-2008, 12:40 PM
Do you want to Filter 1 field on the form or any field on the form?
This passes the sring "New" to a new record.
DoCmd.OpenForm "Contestants", , , , acFormAdd, acDialog, "New"

OBP
06-18-2008, 12:54 PM
An alternative.

FrymanTCU
06-18-2008, 01:27 PM
OBP that is a nice alternative, thank you I have a couple of ideas for that type of functionality. But I did try the OpenArgs function you posted and have the variable passing to the second form I just am not sure what to do then... If I mark this thread as solved can I unmark it if I get stuck again?

OBP
06-18-2008, 02:35 PM
Yes, of course you can ask more questions.
have you considered Filtering the data in the Form's Query?
You can use
forms![Form name]![Field name]
in the Criteria Row of the Query, hence my question about how many fields you want to filter?