I have a report that in Private Sub Report_Load() and Private Sub ReportHeader_Format tests for certain parameters and if not found to exist it then exits the Subs because there is no data to generate in the detail of the report. Because there is no data I run the following:
Private Sub Report_NoData(Cancel As Integer)
Msg = “Select a Supplier” & vbCrLf & vbCrLf & “Cancelling Report…”
Button = vbExclamation
Title = “Account Report Error 1…”
Response = MsgBox(Msg, Button, Title)
Cancel = True
End Sub
This sub displays the message as desired, but on clicking OK the following a MS Access error dialogue advising “The OpenReport action was canceled” is displayed. How do I stop this dialogue from being displayed?
I’ve tried inserting an error procedure in the Private Sub Report_NoData() but that just seems to be ignored.
Any suggestions will be appreciated.
Regards
BygAuldByrd
[/COLOR]