NoData cancel on 1st report affects 2nd report

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.
 
M

Marshall Barton

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.
 
E

EManning

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top