Results 1 to 7 of 7
  1. #1
    Gater is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Oct 2014
    Location
    Telford
    Posts
    4

    Printing multiple reports

    Hi all, I have an access 2002 database I use for organising jobs in our workshop. I have a table that uses the auto number field as a unique job number and each record is the job along with various other details. At the moment to print a "job sheet" report for each job, I run a query that the criteria asks for a job number (the auto number assigned to the record), then click ok to preview the "job sheet" report. From there I just print the report as normal. Is it possible to somehow enter a job sheet number "from" and "to" to enable me to print multiple job sheets in one go or batch? The one at a time approach works but can take quiet a while when organising many jobs at once.


    Many thanks,
    Gater

  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,948
    Options:

    1. one report with filter criteria to include records that meet the "from" and "to" criteria - design report to force page break for each job

    2. VBA looping structure to print each job as individual report
    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
    Gater is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Oct 2014
    Location
    Telford
    Posts
    4
    Hi june7,
    I think I prefer the option 2 solution. How would I go about this?

  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,948
    Open a recordset of the desired job number, then in looping structure, open report filtered to one job number, print report, close report, move to next job number record and repeat. Something like:

    Dim rs As DAO.Recordset
    If Not IsNull(Me.tbxStart) And Not IsNull(Me.tbxEnd) Then
    Set rs = CurrentDb.OpenRecordset("SELECT JobNumber FROM tablename WHERE JobNumber BETWEEN " & Me.tbxStart & " AND " & Me.tbxEnd & ";")
    While Not rs.EOF
    DoCmd.OpenReport "reportname", , , "JobNumber=" & rs!JobNumber
    DoCmd.Close acReport, "reportname"
    rs.MoveNext
    Wend
    End If
    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
    Gater is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Oct 2014
    Location
    Telford
    Posts
    4
    Thanks for that. Would this code be placed in a command button on click property?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,948
    That's a common location for code like this.
    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.

  7. #7
    Gater is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Oct 2014
    Location
    Telford
    Posts
    4
    Many thanks

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

Similar Threads

  1. Replies: 4
    Last Post: 11-07-2012, 09:59 AM
  2. Help printing off multiple reports.
    By MelonFuel in forum Forms
    Replies: 5
    Last Post: 06-29-2012, 12:25 PM
  3. Printing multiple reports for one record
    By brew in forum Programming
    Replies: 3
    Last Post: 11-18-2011, 10:01 AM
  4. Replies: 3
    Last Post: 05-23-2011, 01:52 PM
  5. Printing multiple reports with one command
    By AKQTS in forum Reports
    Replies: 2
    Last Post: 09-24-2010, 09:32 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