Copying Data to a new Form

T

T. Carver

I am wondering if anyone knows the code to copy data from one form and apply
that data to a new form. To be more specific, when I push the command button
to open the new form, I need data from the previous form to be copied to the
new form.
 
K

Klatuu

Use the load event of the form being opened to copy the data elements from
the first form to the controls on the being opened. You will want to be sure
the first form is open.

If Currentproject.AllForms("frmimportpipeline").IsLoaded Then
Me.txtSomeControl = Forms!frmFirstForm!txtSomeControl
Me.txtAnotherControl = Forms!frmFirstForm!txtAnotherControl
End If
 
K

Keith Wilby

T. Carver said:
I am wondering if anyone knows the code to copy data from one form and
apply
that data to a new form. To be more specific, when I push the command
button
to open the new form, I need data from the previous form to be copied to
the
new form.

Please don't multi-post!
 
T

T. Carver

Thank you. It worked.
--
T. Carver


Klatuu said:
Use the load event of the form being opened to copy the data elements from
the first form to the controls on the being opened. You will want to be sure
the first form is open.

If Currentproject.AllForms("frmimportpipeline").IsLoaded Then
Me.txtSomeControl = Forms!frmFirstForm!txtSomeControl
Me.txtAnotherControl = Forms!frmFirstForm!txtAnotherControl
End If
 
K

Keith Wilby

T. Carver said:
SORRY!!! Didn't realize I did.

Sent in error, cancelled immediately but still my message appeared! My
apologies, you didn't multi-post at all.

Keith.
 
Top