I am trying to place a find button and a print record button on my form. After I do it, I get this error message when I click either of the buttons. I am able to place buttons on some of my other forms in this database, but this form is different in that it is derived from a many to many relationship. I am thinking that has something to do with my problem. I have looked into the Event Procedure property of the on Click and from my limited knowledge, it looks fine. Do you have any ideas?
Private Sub Command148_Click()
On Error GoTo Err_Command148_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Exit_Command148_Click:
Exit Sub
Err_Command148_Click:
MsgBox Err.Description
Resume Exit_Command148_Click
End Sub
The expression On Click you entered as the event property setting produced the following error.
*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event or macro.
I am presuming that the error is the latter of the two.
I can post the form or entire database later if you think it will help.
Private Sub Command148_Click()
On Error GoTo Err_Command148_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Exit_Command148_Click:
Exit Sub
Err_Command148_Click:
MsgBox Err.Description
Resume Exit_Command148_Click
End Sub
The expression On Click you entered as the event property setting produced the following error.
*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event or macro.
I am presuming that the error is the latter of the two.
I can post the form or entire database later if you think it will help.