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!

keep form variable for new record

Status
Not open for further replies.

twcman

Programmer
Jun 28, 2001
284
US
I have a pop up form that is based on an id from the parent form. On the popup form I have a hidden field that is populated with this id. When I try to add a new record, the field is blank. How can I maintain the id value sent from the parent for so I can view records as well as add new ones?

Chris Scott
The Whole Computer Medical Systems
 
You could pass the id in the OpenArgs of the form (one of the arguments of the openform method). Then in the form's OnLoad event, put Me!id = Me.OpenArgs.

Another way would be to declare a public variable in a module, assign the id to the variable, then write the variable to the appropriate control of the popup form.

HTH,

Ken S.
 
Thanks for your response.
That worked..

Chris Scott
The Whole Computer Medical Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top