Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Multiple reports at the same time

Status
Not open for further replies.

hamburg18w

Technical User
Dec 27, 2005
32
US
I am using Access 2007 and have built a number of reports based on quiries that I run on a weekly basis. Is there a way I can print all the reports at once rather than printing them individually?

I searched through similar questions other people have asked but could not make it work. I must be missing some information. I need detailed instructions. Thanks.

Juan
 
For ease of maintenance, I would create a small table of reports with a sequence field like:
[tt]
tblReportCue
rptName rptSequence
======================== ===========
rptOneName 1
rptTwoName 2
rptThreeName 4
rptFourName 0
rptFiveName 3
[/tt]
Display this table as a subform in a main form so you can edit the order you want to run the reports or place a 0 if you don't want to run.

Then add a command button to run the reports. The code might be something like:
Code:
Private Sub cmdRunReports_Click()
    Dim db as DAO.Database
    Dim rs as DAO.Recordset
    Dim strSQL as String
    Dim strRptName as String
    Set db = Currentdb
    strSQL = "SELECT rptName FROM tblReportCue " & _
        "WHERE rptSequence <> 0 ORDER BY rptSequence"
    Set rs = db.OpenRecordset(strSQL)
    Do Until rs.EOF
        strRptName = rs!rptName
        DoCmd.OpenReport strRptName, acNormal
        rs.MoveNext
    Loop
    rs.Close
    set rs = Nothing
    set db = Nothing
End Sub

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top