Opening a form from another one

G

Guest

I need the VBA code to open a form from another form and display the data
currently in a control of the first form in a control of the second form by
clicking a button. I know about stLinkCriteria but some times mor flexibility
is needed. I tried [Form2]![Control2]=Me![control1] after the
"DoCmd.OpenForm.." in the "OnClick" property of the button but it did not
work. Any idea?
 
C

Carl Rapson

You could pass the data from your control in the OpenArgs parameter of the
OpenForm call, then pick up that value in the second form's Open or Load
event and populate your control with it.

Carl Rapson
 
C

Carl Rapson

You could pass the data from your control in the OpenArgs parameter of the
OpenForm call, then pick up that value in the second form's Open or Load
event and populate your control with it.

Carl Rapson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top