Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print only first page on report (2000)

    Hi,

    Can anyone help to show me how I can only print the first page on a report via VBA?
    Best Regards,

    Luke

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print only first page on report (2000)

    If the report is already open in preview mode, use
    DoCmd.PrintOut acPages, 1, 1

    If the report is not open, select it in the database window, then use the same code:
    DoCmd.SelectObject acReport, "rptTest", True
    DoCmd.PrintOut acPages, 1, 1

  3. #3
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print only first page on report (2000)

    How does this work with a wherecondition? How would I fit this into the code?
    Best Regards,

    Luke

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Print only first page on report (2000)

    Open the report in preview mode with a where condition (DoCmd.OpenReport), then proceed as described.

Posting Permissions

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