Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refer to var in different form

Status
Not open for further replies.

nickjar2

Programmer
Jun 20, 2001
778
US
If I ever need to refer to a variable on another form, i would normally add a textbox, set its visible prop to false, and copy the contents of the variable into the textbox. I would then refer to it using forms!formname!textbox.

Is there any way to refer to it without doing this extra work (and without creating a global variable)? I am almost sure that when I used to use Paradox for win (Ver 5) (an absolutely wonderful product), u could open a form ,and pass a value back to the calling form, something on the lines of:

var = openform "form name" Nick (Everton Rool OK!)
 
you can use dcmd.openform "formname, openargs to pass a variable to the form you are opening. In the formopen state, you can check for the value in openargs and use it in the form itself... Check your help to find more information on using open arguments in the docmd.openform statement.

Regards,

katho/
 
Cheers 4 responding,

I don't actually want to open a form and pass it an arguement. I need to open a form, and then pass a variable from the form back to the calling form. Nick (Everton Rool OK!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top