Conditional printing

I

Ivor Williams

I have a form in which one of a number of conditions is chosen for each
record using a combo box. Once a condition is set in each of the records, a
print button is clicked and a report is generated for each condition. Each
report contains all records in the form that meet the condition for that
particular report. Sometimes this results in reports with no records at all.
Is there a way to suppress the printing of the reports with no records?
 
A

Allen Browne

Use the NoData event of the report to cancel it.

(If you used a command button to OpenReport, the command button's code will
need error handling to ignore the error 2501 that notifies it the report did
not open.)
 

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