I have the following code in the On No Data event of a report:
****
On Error GoTo err_trap
MsgBox "No items matching criteria.", vbInformation, gcApplication
Cancel = True
err_trap:
If Err.Number = 2501 Then Exit Sub
****
When the code pointer returns to the calling line:
****
DoCmd.OpenRepor t Forms(gcFrmPrin t).lstReport.Co lumn(1), acViewPreview, ,
strCriteria
****
error 2501 is raised, even though I'm trapping for it both in the calling
procedure and the report code.
Am I missing something obvious? I'm guessing I am :o0
Regards,
Keith.
****
On Error GoTo err_trap
MsgBox "No items matching criteria.", vbInformation, gcApplication
Cancel = True
err_trap:
If Err.Number = 2501 Then Exit Sub
****
When the code pointer returns to the calling line:
****
DoCmd.OpenRepor t Forms(gcFrmPrin t).lstReport.Co lumn(1), acViewPreview, ,
strCriteria
****
error 2501 is raised, even though I'm trapping for it both in the calling
procedure and the report code.
Am I missing something obvious? I'm guessing I am :o0
Regards,
Keith.
Comment