Filling control in a form from a calling form

S

SAC

I have a form with a command button on it.

The command button opwns another form and I'd like some of the data from the
1st form to be inserted into some of the controls on the 2nd form when it
opens.

The second form is unbound.

Do I need to make a temp table?

Thanks.
 
G

Gary Miller

No, you shouldn't need to make a temp table as you can do
this from the code that opens the form. You can do something
like this using your correct names, of course...

DoCmd.OpenForm "Form2Name"

Forms!frmForm2Name!1stControl = Me!1stControl
Forms!frmForm2Name!2stControl = Me!2stControl
--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
S

SAC

Got it! Thanks!

Gary Miller said:
No, you shouldn't need to make a temp table as you can do
this from the code that opens the form. You can do something
like this using your correct names, of course...

DoCmd.OpenForm "Form2Name"

Forms!frmForm2Name!1stControl = Me!1stControl
Forms!frmForm2Name!2stControl = Me!2stControl
--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 

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