I made a database in Access 2000 at home, converted it to Access 97 to use at work, and now (at work) most of the command buttons don’t function. I get the error message “The expression may not result in the name of a macro, the name of a user defined function, or Event Procedure…”
No modules or functions have the same name.
I tried re-making the buttons with the wizard in Access 97, but they don’t work either.
Here is a sample of the code for one button:
Private Sub btnViewAmendments_Click()
On Error GoTo Err_btnViewAmendments_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = “frmAmendment”
stLinkCriteria = “[Trial_Number]=” & “‘” & Me![Trial_number] & “‘”
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_btnViewAmendments_Click:
Exit Sub
Err_btnViewAmendments_Click:
MsgBox Err.Description
Resume Exit_btnViewAmendments_Click
End Sub
Any ideas on what I am doing wrong?
Thanks