Results 1 to 10 of 10
  1. #1
    mhall is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    4

    printing multiple copies of report with multiple pages

    I would like to use laser ncr paper to print 4 part forms. I prefer to buy the paper in packet order (w, y, p, g) rather than all stacks of individual color and have to collate manually. I have set printer to 4 copies stacked. My problem is that when I have a 2 page document, it prints page 1 then 2, then repeats. I need it to print all 4 copies of page 1 and then 4 copies of page 2. Is there anyway to program the report to do this?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Code:
    Public Sub Print1RptByPage(ByVal pvRpt, ByVal piPages As Integer, ByVal piCopies As Integer)
    Dim p As Integer
            'Open report in Preview mode
    DoCmd.OpenReport pvRpt, acViewPreview
            
    For p = 1 To piPages
                'Print out specified number of report copies
        DoCmd.PrintOut , p, p, , piCopies
    Next
    
    DoCmd.Close acReport, pvRpt, acSaveNo
    
    End Sub

  3. #3
    mhall is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    4
    thanks. I'm not well versed in reading the code but it looks like what you have written requires preview mode. This actually is for our bill of lading print which runs in a batch of 10 - 15. Can it be done without the preview?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Nope. Not if you want to control the output of page order. However, can open the report as not visible with acHidden parameter of WindowMode argument.

    ranman, how is the piPages variable set? I am guessing each report will always have the same number of pages and this can be set by the code.
    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.

  5. #5
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    This code is sent by user and THEY know the # pages. I thought it would speed things up to show less code.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Here is a link (untested) that may be of use to control number of copies without PreView.

  7. #7
    mhall is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    4
    I appreciate the posts. As an FYI, some reports in the batch will have 1 page and others will have 2 or 3. I cannot set the number of pages in advance. It seems like I would need some if statement that determines if report is 2 pages it will print all copies of page one and then all copies of page 2. Is that possible?

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Did you look at the link I gave? You could set up a small test and see if it handles reports of different length properly.

  9. #9
    mhall is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    4
    Sorry, I have limited ability to read the code. I will however pass this along to the people who can adjust for me. Thanks for your assistance!

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Orange, the looping function in that article sends the report direct to printer and will print all pages collated - not what OP wants. Wants 4 copies of page 1 then 4 copies of page 2, etc.

    To determine how many pages in report, review http://msdn.microsoft.com/en-us/libr...ffice.11).aspx
    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: 3
    Last Post: 02-04-2014, 04:33 PM
  2. Replies: 3
    Last Post: 08-29-2013, 02:36 PM
  3. Report Generates Multiple Identical Pages
    By astrolabe262 in forum Reports
    Replies: 1
    Last Post: 02-22-2013, 01:29 PM
  4. Replies: 1
    Last Post: 11-30-2011, 07:06 PM
  5. Printing multiple copies of a mailing label
    By Flight Planner in forum Reports
    Replies: 1
    Last Post: 10-19-2006, 08:16 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