I am building a switchboard and have a button for the users to click to generate a report. Once the button is clicked, it gives the user the ability to enter a query parameter. However, if the "cancel" button is clicked on the parameter box, I recieve the "Run-time error 2501" "The OpenReport action was canceled." error message.
I am using some simplistic code tied to the button -
Private Sub Command3_Click()
DoCmd.OpenReport "rptContactsByMember", acPreview
End Sub
I must be missing something here! I'd just like the parameter box to close without generating the error or a blank report.
Thanks everyone for your help.
I am using some simplistic code tied to the button -
Private Sub Command3_Click()
DoCmd.OpenReport "rptContactsByMember", acPreview
End Sub
I must be missing something here! I'd just like the parameter box to close without generating the error or a blank report.
Thanks everyone for your help.