I have a report with the ON NO Data event proc set to
the following code:
===========================================
MsgBox ("No data for this report today - report cancelled ...")
Cancel = True
============================================
The msg box appears fine but after I click on OK I get an error "Run timee error 2501 - The Open Report Action was Cancelled"
The orig report code is as follows:
=============================================
DoCmd.OpenReport "rpt_BtcHdr_IFTA", acPreview
==============================================
My question is. Is there a way to avoid this break in code when ther is no data for this report ???
Thanks for any help ...
Tom Moran
Lansing, Michigan
the following code:
===========================================
MsgBox ("No data for this report today - report cancelled ...")
Cancel = True
============================================
The msg box appears fine but after I click on OK I get an error "Run timee error 2501 - The Open Report Action was Cancelled"
The orig report code is as follows:
=============================================
DoCmd.OpenReport "rpt_BtcHdr_IFTA", acPreview
==============================================
My question is. Is there a way to avoid this break in code when ther is no data for this report ???
Thanks for any help ...
Tom Moran
Lansing, Michigan