• Runtime Print Preview Problem (Access 97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Runtime Print Preview Problem (Access 97)

    Author
    Topic
    #373951

    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?

    Viewing 0 reply threads
    Author
    Replies
    • #602946

      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 … igiveup

      • #603154

        thankyou 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. scratch

        Marty

        • #603382

          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.

          • #603677

            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

            • #603809

              [indent]


              What’s really curious, I have another print preview command button on the same form.


              [/indent]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?

            • #603966

              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.

    Viewing 0 reply threads
    Reply To: Runtime Print Preview Problem (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: