By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,948 Members | 1,929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,948 IT Pros & Developers. It's quick & easy.

Hitting Escape while Previewing Report

P: n/a
I'm totally stuck. When I click on the "Preview" button for a report
on the
database window, pressing the <ESCAPEkey simply closes the report.
But
when I use DoCmd.OpenReport with acPreview on a form, pressing the
<ESCAPEkey dumps the report into design mode.

To add one more quirk, creating a new form, and using the wizard to
create a Print Preview command button sets the report behavior back to
normal, by closing the report clean on <ESCAPE>.

Is there something on the existing form that call the Preview that
would cause this?

Aug 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
So, I finally figured it out. I was launching the print preview from a
button I added to a converted printer selection form from ADH 97.
After much code review, I realized that the function which grabbed the
default printer for the report left the report open in design mode.

When it "opened" in Preview mode, it was still in design, so ESCAPING
brought it back to design.

I added a line of code to close the report, if open, when the preview
button is clicked, and then open it in acPreview and that did the
trick.

ve******@gmail.com wrote:
I'm totally stuck. When I click on the "Preview" button for a report
on the
database window, pressing the <ESCAPEkey simply closes the report.
But
when I use DoCmd.OpenReport with acPreview on a form, pressing the
<ESCAPEkey dumps the report into design mode.

To add one more quirk, creating a new form, and using the wizard to
create a Print Preview command button sets the report behavior back to
normal, by closing the report clean on <ESCAPE>.

Is there something on the existing form that call the Preview that
would cause this?
Aug 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.