• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1109
  • Last Modified:

Pass data from one access form to another

I have a tab control, in the tab control, there are 2 forms that populated from 2 different query, and the 2 forms have some fields that are identical. What I need is what I entered in form1 will appear in form 2 when I change the tab. Please help. Thanks.
0
CochiseCounty
Asked:
CochiseCounty
  • 4
  • 3
1 Solution
 
thenelsonCommented:
In the after update event of the controls of form1 put:
Me.Parent.Fonm2Name.Form.Requery

In the after update event of the controls of form2 put:
Me.Parent.Fonm1Name.Form.Requery
0
 
CochiseCountyAuthor Commented:
So, if in form1, I have a control name form1field1, and in form1, I have a control name form2field1. Form1 is placed in page1 of tabcontrol1 and form2 is placed in page2 of the same tablcontrol1. What I need is when I click on page1, enter a value 'test' to the form1field1, then click on page2, the value 'test' appear on form2field1. What I need to do? Thanks for help.
0
 
thenelsonCommented:
I believe it would be:

Private sub  form1field1_AfterUpdate ()
Me.tabcontrol1.Pages(2).Form2!form1field1.ReQuery
End Sub
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
CochiseCountyAuthor Commented:
I tried that, it's not working
Let me explain again.
I have aform called Form1, in the Form1, I add tab control called TabCtl0, the tab control TabCtl0 has 2 pages (Page1 and Page2). In Page1, I add a subform called SubForm1, In Page2, I add a subform called SubForm2.
In SubForm1, I have a textfield called Text1, in SubForm2, I have a textfield called Text2. What I need is when I enter a value into Text1, click the tab Page2, the value entered in Text1 will be displayed in Text2.

Thanks for help
0
 
thenelsonCommented:
Are Text1 and Text2 bound to the same field?  

If yes, then Text2 should automatically display the value of Text1.  Is it doesn't, then you need to requery it.

If no, is there a a reason you cannot bind them to the same field?
0
 
CochiseCountyAuthor Commented:
Hi thenelson,
I made it work, here is what I did
Private Sub Text1_AfterUpdate()
Me.Parent.Child7.Form.Text2 = Me.Text1
End Sub
0
 
thenelsonCommented:
Great!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now