opening from 1 access form 2 another at same data info

T

Trev

Help please , im still learning 2007 access , i have created two forms
relating back to one table and i want to switch between them but when i do
they go back to the first record . How can i switch between keeping the same
data record . many thanks
Trev
 
A

Arvin Meyer [MVP]

Use some code in an event, probably the click event of a command button:

Sub MyButton Click()
DoCmd.OpenForm "frmNumberTwoName", , , "IDkey =" & Me.txtIDcontrol
End Sub

where frmNumberTwoName is the name of your second form, IDkey is the name of
the Primary Key field, and txtIDcontrol is the name of the textbox holding
the IDkey value, in the first form.
 

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