Results 1 to 2 of 2
  1. #1
    tylerg11 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    200

    Print Page 1 Only of Access Report from Form

    Hello,

    I am trying to open a report from a form and print the first page only without any dialog boxes popping up, etc.

    Code:
    DoCmd.OpenReport "R_PROPOSAL", acViewPreview, , "PROPOSAL_ID='" & Me.PROPOSAL_ID & "'", acHidden
    DoCmd.PrintOut acPages, 1, 1, acHigh
    DoCmd.Close acReport, "R_PROPOSAL", acSaveNo
    If I use DoCmd.OpenReport (which prints automatically) it prints all pages.

    If I use the above code which opens the report in Print Preview (and hidden) The PrintOut ends up printing my current active object (the form and not the report). If I remove acHidden then it prints what I want it to. I just want it to happen without showing the preview.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,915
    I don't think you can as apparently hidden (not visible) object can't have focus.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-06-2013, 09:19 PM
  2. How do I not print a page in a report
    By SFC in forum Reports
    Replies: 3
    Last Post: 08-15-2012, 11:47 AM
  3. Report print two records per page
    By dwilson in forum Reports
    Replies: 3
    Last Post: 07-21-2012, 10:48 AM
  4. Replies: 3
    Last Post: 08-07-2011, 09:22 PM
  5. Replies: 4
    Last Post: 04-11-2011, 04:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums