Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Runtime Print Preview Problem (Access 97)

    I have a dozen or so reports in my database that are opened in print preview mode through their respective command buttons and docmd.openreport statements. When in runtime mode, all but two print correctly when the File-Print option is selected from the menu while in preview mode. Two of the reports preview correctly, but print the underlying form image when the File-Print option is selected from the menu. The underlying VB code is essentially the same except for the name of the report. If I change to acNormal, the two reports print correctly. Any ideas on what might be causing the problem?

  2. #2
    New Lounger
    Join Date
    Apr 2002
    Location
    Sydney, NSW, Australia
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Runtime Print Preview Problem (Access 97)

    It sounds like the form is the currently active object (has the focus) rather than the report when you select print from the menu bar. I don't know why that would happen.

    If the report is not maximised in the Access window, maximise it and see if that makes a difference as then there should be no confusion (by Access) as to which object is active.

    Otherwise ... <img src=/S/igiveup.gif border=0 alt=igiveup width=31 height=23>

  3. #3
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Runtime Print Preview Problem (Access 97)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=36 height=24> for your suggestion. I added the maximize to both reports ... one now prints correctly the other still prints the underlying form screen. In each case the the active form is three levels deep and the main form is maximized. <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    Marty

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Runtime Print Preview Problem (Access 97)

    I'm getting confused between reports and forms here. What do you mean by "prints the underlying form screen"? If you are printing your report from preview mode and the report has the focus, then the only way it could print a form is if the menubar or button you use to print has something in it pointing to that form.
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Runtime Print Preview Problem (Access 97)

    Charlotte:

    What I mean by the underlying form screen, is from the print preview mode of my report, when the File-Print is selected from the menu bar (I have not modified the File-Print menu function), the report is not being printed, but rather the screen image of the form that was active and had the command button which opened the report in preview mode. What's really curious, I have another print preview command button on the same form. It always prints correctly!

    Look forward to your thoughts as to why the print function doesn't think this one preview report is not the current object.
    Thanks
    Marty

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Runtime Print Preview Problem (Access 97)

    <hr>What's really curious, I have another print preview command button on the same form.<hr>
    This is what is confusing. Why would you have more than one preview button the same form? Assuming that the reason is that each button calls a separate report, what is different about the code behind the several buttons or about the code behind the reports they call?
    Charlotte

  7. #7
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Runtime Print Preview Problem (Access 97)

    Nothing. I'm lazy and let the Wizard build the code behind each of the command buttons. And yes the buttons are to print different reports.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •