Hitting Escape while Previewing Report

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vermutmb@gmail.com

    #1

    Hitting Escape while Previewing Report

    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.OpenRepor t 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?

  • vermutmb@gmail.com

    #2
    Re: Hitting Escape while Previewing Report

    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.

    vermutmb@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.OpenRepor t 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?

    Comment

    Working...