Exiting a report using VBA

  • Thread starter Thread starter John Baker
  • Start date Start date
J

John Baker

Is it possible to exit a report from one of the events of the report?

I have a call to a subprocedure from the report_open event. Depending on
certain values in the subprocedure I would like to be able to end the
report. I tried to do this with a docmd.close command but it wont let me
exit at this point.

Any help greatly appreciated.

John Baker
(e-mail address removed)
 
The Report_Open event has a Cancel argument.

Just set that to True to cancel loading the report:
Cancel = True

Note that the report data is not present at this time.
 
Back
Top