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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print multiple reports from Dialog Form

Status
Not open for further replies.

Geeklette

Technical User
Jun 3, 2003
3
US
We have various reports. We have an existing Dialog Form which allows a user to select a month and then select a particular report to preview and/or print. Mgmt wants another form whereby a secretary can choose the month, click an OK button, and a predetermined set of 5 mgmt reports will automatically print. We don't want to put events on these 5 reports because they are also some of the reports available on the existing Dialog Form mentioned above. We don't know VBA (I'm learning it on my own) and we're not giants on macros, but learning quickly. I know how to tie in the query with [Forms]!..etc. So - how can we pass a value from a Dialog form that will print 5 different reports which are based on various different queries? Thank you very much.
 
Hi. I'm replying to my own post..! I searched more and found a thread entered by mikj01 on 6/22/01. Lonnie Johnson answered the question with the info below. I'm using a dialog form so assume these statements would be on an event on the form. (Forgive us who are learning). I'm going to play around with this. If anyone would like to provide more details per my original question, PLEASE DO! Thanks.---------------------

The actual syntax for printing a report is...

Docmd.OpenReport "ReportName"

If you want to print multiple reports then you would say

Docmd.OpenReport "ReportName1"
Docmd.OpenReport "ReportName2"
Docmd.OpenReport "ReportName3"
 
Docmd.OpenReport "ReportName1" acNormal
is to print.

Docmd.OpenReport "ReportName1" acPreview
opens in preview.

..but you pretty much got what you need.

you could do it in a macro too i bet,
if you run in to too much trouble with vba.

-g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top