Carry Data From one form to another

  • Thread starter Thread starter nxqviet
  • Start date Start date
N

nxqviet

Hi there,

My question is regarding the transfer of data from one form to the
next. On form 1, there is a button that allow you to open form 2 to
view some addtional information about the selected Item.

When form 2 opened. I want some of the information from form 1 to
transfer to the respective fields in form 2. So I used the following
procedures

(1) When click the open form 2 button, the data of interest will be
save to a Public Module
Public1 = Me.field1
Public2 = Me.field2
Public3 = Me.field3
(2)Then do open form action
(3) Then some how load these public values to the opended form2 (I
have problem with this step) ?????

As a side note, because form 2 can be opend and used indipendently,
thats why I did not set Load_ action for form 2 to call out these
public data. This essentually, is a referencing question. I need to
execute many actions on form2, but the code must belong to the button
on form1. How do I achieve this?

Thanks for the help

V-
 
I'm an amateur, but here's how I do it:

To transfer data from text box "Text1" on Form 1 to text box "Text2"
on Form 2:

Form 1's button code:


Private Sub Command1_Click()
Forms!Form2!Text2 = Text1
End Sub
 
Thanks


j_beverly said:
I'm an amateur, but here's how I do it:

To transfer data from text box "Text1" on Form 1 to text box "Text2"
on Form 2:

Form 1's button code:


Private Sub Command1_Click()
Forms!Form2!Text2 = Text1
End Sub
 
My question is regarding the transfer of data from one form to the
next. On form 1, there is a button that allow you to open form 2 to
view some addtional information about the selected Item.

First off: data is NOT stored in Forms. Forms are just windows.

Secondly: if you're copying data from the first form's Table to a
different Table bound to the second form... *DON'T*. Storing data
redundantly in two places is *never* a good idea!

What is the structure and relationships of your Tables? Are you in
fact trying to copy the same information into a second table... or am
I just borrowing trouble?

John W. Vinson[MVP]
 

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

Back
Top