Results 1 to 4 of 4
  1. #1
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191

    Report Print All


    HI All, i have a report to print, there are 2 x criteria's on the report, 1 is a Date selected by a combo box and the other is a client again selected via a combo box, I currently click on each client to print their report, ie: if there are 40 clients, i click on each name to print the report 40 times!! is there a method to keep that client criteria in place (otherwise all clients will print on one continuous report) and have an option to print all instead of clicking on each client from the combo box ?? many thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    You have code in combobox AfterUpdate event to print report? Click, wait for report, click, wait for report, repeat 38 more times? yuck! Imagine if there were hundreds! Big yuck!

    In VBA open a recordset of the desired clients. Will require filter criteria to define the desired set of clients. Loop through recordset to open filtered report, print, close.

    If page numbering is not an issue and report designed for each client to start on new page, then apply the above filter criteria to report and print one long print job.
    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.

  3. #3
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191

    Talking

    Quote Originally Posted by June7 View Post
    You have code in combobox AfterUpdate event to print report? Click, wait for report, click, wait for report, repeat 38 more times? yuck! Imagine if there were hundreds! Big yuck!

    In VBA open a recordset of the desired clients. Will require filter criteria to define the desired set of clients. Loop through recordset to open filtered report, print, close.

    If page numbering is not an issue and report designed for each client to start on new page, then apply the above filter criteria to report and print one long print job.
    Hi There thank you for you your reply, something like Set rs = Currentdb.OpenRecordset("Select * From Table WHERE Date = #" & Forms!frmJobDate!cboDate & "#") Then Do Until rs.EOF Then print from there, is this where you were pointing towards (printing all via rs instead of Yuck as you quite rightly say)

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Yes, something like that.

    Dim rs As DAO.Recordset
    Set rs = Currentdb.OpenRecordset("Select * From Table WHERE Date = #" & Forms!frmJobDate!cboDate & "#")
    Do Until rs.EOF
    DoCmd.OpenReport "reportname", , , "ClientID=" & rs!ClientID
    rs.MoveNext
    Loop

    Reports will go straight to printer so should not need PrintOut and Close commands.
    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: 04-28-2017, 09:51 AM
  2. Replies: 5
    Last Post: 08-06-2015, 03:26 PM
  3. Replies: 3
    Last Post: 04-15-2015, 03:19 PM
  4. Replies: 1
    Last Post: 02-21-2015, 11:35 PM
  5. Replies: 6
    Last Post: 03-01-2014, 07:07 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