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

Macro to create multiple reports

Status
Not open for further replies.

fh2level

Technical User
Sep 22, 2006
7
Hopefully someone can point me in the right direction. Every week I have to create reports for about 7 different departments. The reports are already made and the query to pull the correct info to put in the reports are already made. Is there a way to make a macro automatically generate the reports, and save them to a PDF and to have it do it one after another so it does not crash my crappy computer?
 
Ok I almost have it but some reports do not alway have to go out, i.e. if the report is blank. Is there a way to write a condition in the macro that it will only open a report if the query that the report pulls from has results?

I hope that makes sense because I am starting to confuse myself :)
 
you can open the report thru the macro and in the report on open it should check if there is data and then the macro can close the report

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
The Report object has a NoData event ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
phv is correct

but in the report load event you got to make the command of printing the report to pdf and then the macro will close it or even close it in the code with the docmd.close (acReport, "Reportname)



I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
your welcome

I will try my best to help others so will others do!!!!!
IGPCS
Brooklyn, NY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top