Greetings o wise Access masters!
I've created a search form using filters and have a button to take the user to the selected record in the data entry form. It works like a charm, but along with the data entry form I get a dialog box with the following message "The OpenForm action was cancelled". But it isn't, it opened just fine, so I'm confused. I'm using MS Access 2003 and below is the event procedure for the button. Any suggestions on getting rid of the dialog box?
Thank you!
Nathan
Code:
Private Sub Open_record_Click()
On Error GoTo Err_Open_record_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "data_entry"
stLinkCriteria = "[CONVERT_LNAME]=" & "'" & Me![CONVERT_LNAME] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
stLinkCriteria = "[CONVERT_FNAME]=" & "'" & Me![CONVERT_FNAME] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
stLinkCriteria = "[RABBI_FNAME]=" & "'" & Me![RABBI_FNAME] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
stLinkCriteria = "[RABBI_LNAME]=" & "'" & Me![RABBI_LNAME] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
stLinkCriteria = "[DATE]=" & "'" & Me![DATE] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Open_record_Click:
Exit Sub
Err_Open_record_Click:
MsgBox Err.Description
Resume Exit_Open_record_Click
End Sub