Print Multiple Reports from one button

  • Thread starter Scott_66701 via AccessMonster.com
  • Start date
S

Scott_66701 via AccessMonster.com

Hi, I have 5 reports, "Report1, Report2, 3, 4, 5" and I am wanting to be able
to click the "Print Reports" button and have all the report, 1-5 print by
just clicking that button. How can I do that?
 
T

Tom Wickerath

Hi Scott,

Try something like this:

Private Sub cmdPreviewReport_Click(Cancel As Integer)
On Error GoTo ProcError

DoCmd.OpenReport "Report1"
DoCmd.OpenReport "Report2"
DoCmd.OpenReport "Report3"
DoCmd.OpenReport "Report4"
DoCmd.OpenReport "Report5"

ExitProc:
Exit Sub
ProcError:
Select Case Err.Number
Case 2501 ' No data or user cancels, so ignore this error.
Case Else
MsgBox Err.Number & ": " & Err.Description, vbCritical, _
"Error in cmdPreviewReport_Click Event Procedure..."
End Select
Resume Next
End Sub



Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top