Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, CA, USA
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page Setup VBA Code? (Access 97)

    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

  2. #2
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page Setup VBA Code? (Access 97)

    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.
    Carpy Diem, it's .

  3. #3
    Star Lounger
    Join Date
    Dec 2001
    Location
    Fredensborg, Denmark
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page Setup VBA Code? (Access 97)

    You may use:

    DoCmd.RunCommand acCmdPageSetup

  4. #4
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, CA, USA
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page Setup VBA Code? (Access 97)

    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.

Posting Permissions

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