I have a button in a form which opens up a report. The report is controlled by a query that has criteria search fields. If a user presses the button and is prompted with a criteria search box but cancels out of it, access shows the message "The OpenReport action was canceled"
Is there any way to get rid of this message from appearing? Exiting out of the criteria search box is common and this message is just one extra click. The code for the button is below. Thanks!
Code:Private Sub btnOpenReport_Click()On Error GoTo btnOpenReport_Click_Err DoCmd.OpenReport "rptComplaints", acViewReport, "", "", acNormal btnOpenReport_Click_Exit: Exit Sub btnOpenReport_Click_Err: MsgBox Error$ Resume btnOpenReport_Click_Exit End Sub