I am creating a db in Access 2000. The code below is part of an "on click" for a button on Form1, which is supposed to open Form2 (it does) and go to the record for the same individual that Form1 is open to (it does not). I've tried everything, including writing the same thing as a Macro (which doesn't work), and letting the Wizard create the code for me (which, once complete, also doesn't work). I've even gone to the trouble of installing my private copy of Access XP on my work computer, hoping that it would solve the problem, but I have had no more luck with that version. Here's the code that I'm trying to use:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Employer Form"
stLinkCriteria = "[FileNumber]=" & Me![Participant]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Has anyone else had this problem? What can I do to get this code to open the proper record in the 2nd form?
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Employer Form"
stLinkCriteria = "[FileNumber]=" & Me![Participant]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Has anyone else had this problem? What can I do to get this code to open the proper record in the 2nd form?