• Page Setup VBA Code? (Access 97)

    Author
    Topic
    #365690

    Could anyone help me with the VBA code to open the Page Setup Dialog box used to set up a page to print.
    Also where is all the code to open the various print dialog boxes?
    Thanks
    Frank Hoeffer

    Viewing 1 reply thread
    Author
    Replies
    • #565126

      If you do:

      DoCmd.DoMenuItem acFormBar, 0, 7, , acMenuVer70

      It should go to file/page setup and the dialog box will show up. As far as the code goes, on a standard form bar, the first reference (File) is labelled as 0, the second (Edit) is labelled as 1, etc. If you consider manually clicking File, and then seeing the different option choices, they are labelled starting with 0, and continuing to the end of the list. So for the above example, we’re telling it to go to File, and then count down to reference 7, which should be Page Setup.

      Hope this helps.

    • #565129

      You may use:

      DoCmd.RunCommand acCmdPageSetup

      • #565188

        I get “This action can’t be carried out while processing a form or report event.
        Frank

        PS, I used Send keys to access the menubar and got it to work.

    Viewing 1 reply thread
    Reply To: Page Setup VBA Code? (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: