NoData cancel on 1st report affects 2nd report

  • Thread starter Thread starter EManning
  • Start date Start date
E

EManning

Using A2K. I've got 2 reports that I want to print one after the
other. Below is the coding:


DoCmd.OpenReport "rptBilling_FutureCharges", acViewPreview
DoCmd.OpenReport "rptBilling_Summary", acViewPreview


If the NoData event fires for "_FutureCharges", then "_Summary" won't
print either even though there's data for it. It's NoData event does not
appear to fire but somehow it cancels as well.


How do I get around this problem? Any help or advice is appreciated.
 
EManning said:
Using A2K. I've got 2 reports that I want to print one after the
other. Below is the coding:


DoCmd.OpenReport "rptBilling_FutureCharges", acViewPreview
DoCmd.OpenReport "rptBilling_Summary", acViewPreview


If the NoData event fires for "_FutureCharges", then "_Summary" won't
print either even though there's data for it. It's NoData event does not
appear to fire but somehow it cancels as well.

Are you getting a dialog message about the report being
canceled?

If so then use error handling to trap the message and then
resume to the code to print the second report.
 
Thanks. That's what needed to be done.


Marshall Barton said:
Are you getting a dialog message about the report being
canceled?

If so then use error handling to trap the message and then
resume to the code to print the second report.
 
Back
Top