I have a multi-record form in Access 2007 with a command button at end of the line.
The current record could be the first for instance but I want to click on the button on the 4th record (without actually having to go into record) and open a form with info related to 4th record.
Currently it brings up info related to 1st record because the cursor was in a field on that 1st record.
When I click on the button on the 4th record it still seems to think its on the first record.
My code is:
Dim stDocName As String
DoCmd.OpenForm stDocName, , , "WorkAddressId = forms!Persons!WorkAddressId"