Varvaroudis
New member
- Local time
- Today, 18:17
- Joined
- Oct 12, 2009
- Messages
- 5
Hi!
I have two different Forms with the same Record Source table and I'm trying to set a button in the first form which opens the second form at the same record.
So far I tried the code below
Dim test as integer
test = 27
DoCmd.OpenForm "CustomerForm", , , "[CustomerID] =" & test
The test variable will be given a value from a textbox containing the CustomerID (which is the table's primary key)
The code above is opening the CustomerForm at the record with CustomerID=27, but it applies a filter and shows ONLY that record. Is there a way to just go to that record?
I've also experimented with docmd.gotorecord to no avail.
I have two different Forms with the same Record Source table and I'm trying to set a button in the first form which opens the second form at the same record.
So far I tried the code below
Dim test as integer
test = 27
DoCmd.OpenForm "CustomerForm", , , "[CustomerID] =" & test
The test variable will be given a value from a textbox containing the CustomerID (which is the table's primary key)
The code above is opening the CustomerForm at the record with CustomerID=27, but it applies a filter and shows ONLY that record. Is there a way to just go to that record?
I've also experimented with docmd.gotorecord to no avail.