Coding 2 differen forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 forms that feed 2 different tables. I would like form 1/table 1 to
feed certain information into form 2/table 2. How would I go about this?
 
If you want the value of [Text Box 1] on [Form 1] to copy to [Text Box 2] on
[Form 2], just write:

[Form 2]![Text Box 2] = [Form 1]![Text Box 1]

You haven't said WHEN you want this to happen. If you want it to happen when
you click a button particular button on [Form 2], then double click the
button in design view. Under the Events tab, select the row marked On Click.
Push the button on the right with the three dots (...). This will take you
into the code window. Paste the code I put above.

Note you will get an error if either form is not open at the time.

Cheers

David
 
It can be done, but both forms must be open to do it. In Form2, you can
reference any control in Form1 with something like:

Me.MyTextBox2 = forms!Form1!MyTextBox1
 

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