Printing multiple reports

J

Joanne

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.
 
F

fredg

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.
 
Top