Printing multiple reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to add a command button on my switchboard that will preview and
or print all 7 of my database reports as a group. As it is now, I have to
select each report separately. How do I do this? Thanks for any help.
 
I would like to add a command button on my switchboard that will preview and
or print all 7 of my database reports as a group. As it is now, I have to
select each report separately. How do I do this? Thanks for any help.

Code the command button click event:

Dim doc As Document
Dim cont As Container

With CurrentDb
For Each cont In .Containers
If cont.Name = "Reports" Then
For Each doc In cont.Documents
DoCmd.OpenReport doc.Name, acViewPreview
Next doc
End If
Next cont
End With

Change acViewPreview to acViewNormal to print the reports.
 
Thank you Fred. I'll give it a try.

Joanne


fredg said:
Code the command button click event:

Dim doc As Document
Dim cont As Container

With CurrentDb
For Each cont In .Containers
If cont.Name = "Reports" Then
For Each doc In cont.Documents
DoCmd.OpenReport doc.Name, acViewPreview
Next doc
End If
Next cont
End With

Change acViewPreview to acViewNormal to print the reports.
 
Back
Top