I keep on getting the same error message and I don't know how to either solve the problem or prevent it from showing the error. I have set up a switchboard item that opens a report. When the report opens it will call a form so that the user can change parameters in the report and filter the information before the report is generated see below.
If the user closes the filter box it will cancel the report generation but for some reason it always spits out the same error message.
I have tried using error handling in the code but the problem is that the error is generated outside of the open event and the error handling is not triggered.
Thanks for help.
Code:
Private Sub Report_Open(Cancel As Integer) DoCmd.OpenForm "CostCodeFilter", , , , acFormAdd, 3 'Triggered object in the form will let the program know if the user has cancelled the report. If Reports![Cost Code Stats].Controls("Label14").Visible = False Then Cancel = True End If End Sub
I have tried using error handling in the code but the problem is that the error is generated outside of the open event and the error handling is not triggered.
Thanks for help.
Comment