I have some reports that when they are run, if there is no data, return an ugly error.
I want to make my own error dialog box in this case so I attempted the following...
On Error GoTo Rpt_NoData
code for running the report
exit_Rpt:
End Sub
Rpt_NoData:
MsgBox "There are no records", etc...
Resume exit_Rpt
But I'm getting a compile error on the line...
On Error GoTo Rpt_NoData
The error says the label is not defined...
Did I miss something silly here... this should work.
I want to make my own error dialog box in this case so I attempted the following...
On Error GoTo Rpt_NoData
code for running the report
exit_Rpt:
End Sub
Rpt_NoData:
MsgBox "There are no records", etc...
Resume exit_Rpt
But I'm getting a compile error on the line...
On Error GoTo Rpt_NoData
The error says the label is not defined...
Did I miss something silly here... this should work.