Close form and Reports

W

Whitney

Help! I'm trying to write an event procedure to close a form and the report
or subreports within a report.

I'm using the following:
DoCmd.Close or DoCmd.Close acform, "LocationSelector"
and
DoCmd.Close acReport, "CS Head Count Summary"

Closing the form works fine, but it won't close the report. I get a debug
error message for the report script.

The report contains 5 subreports. Does that make a difference? I'm able to
use this command for closing reports without subreports. Is there another
script that works better? I tried adding the script to the subreports, but
that just means you have to hit cancel 5 times.
 
A

Allen Browne

The subreports are not the problem, so something else is going on.

What does the error message say? Does it have a number?
 

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