I've got a form that list photo jobs that were shot. I have a button to click on this form that will open a detailed form, but using SeachForRecord does not work and go to the record on that form. Here's my code (the message box is just to make sure the variable has the right log number I want to go to - testing only):
What am I doing wrong?
Code:
Function GoToMainEntry()
Dim RecLog As String
RecLog = Forms![frm_ListView]![LogNumber]
DoCmd.OpenForm "frm_MainEntry", acNormal, "", "", , acNormal
DoCmd.SearchForRecord acForm, "frm_MainEntry", acLast, "[LogNumber] = " & RecLog
MsgBox (RecLog)
End Function
What am I doing wrong?