D
Dave
I have the following code in a VBA report module that is designed to alert
the user when the report is blank (i.e., no records):
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo ErrorHandler
MsgBox "There are no records available for your selection."
Cancel = True
....
The above works fine but I also get an additional system-generated message
box telling me "The OpenReport action was cancelled."
The system generated message does not tell the user why the action was
cancelled. I want to use only my own message box and supress the system
generated message so the user doesn't have to respond to two message boxes.
Can this be done? If so how?
the user when the report is blank (i.e., no records):
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo ErrorHandler
MsgBox "There are no records available for your selection."
Cancel = True
....
The above works fine but I also get an additional system-generated message
box telling me "The OpenReport action was cancelled."
The system generated message does not tell the user why the action was
cancelled. I want to use only my own message box and supress the system
generated message so the user doesn't have to respond to two message boxes.
Can this be done? If so how?