Closing a Report in Print Preview using the ESC (Escape) Key

A

AlwaysFroosh!

I have an Access database that consists of local tables and tables linked to
a SQL Server. I have many reports in this .mdb file that are opened by code.
The code executes multiple queries and writes data to temporary tables, etc.
Finally the code opens the form using the following:

DoCmd.OpenReport DATASHEET, acViewPreview

where DATASHEET is the name of the applicable report to open.

When I am working on the report in design view and then switch to Print
Preview, if I press escape it will go back to design view. However, in actual
use, the users never load the report this way, they just use the forms. Due
to the acViewPreview parameter, the report opens by default in print preview.
It used to be that after pressing escape in this instance, the report will
just close.

Something inadvertantly changed in my database though that this is no longer
the case. Now when my users press escape, the report goes back to design
view. I had gotten used to and like the way it was functioning before, and
would like to get it back to that, but I don't know what would have changed.
Any ideas??

Thanks,
Graham
 

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