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

How do I automate reports?

Status
Not open for further replies.

Focusfocs

Programmer
May 3, 2004
35
US
Hello,
I know there should -probably is??- a way a person can automate report generation in MS Access 2003 without too much hassle, but exactly how is a bit beyond me. Is there a way I can either concatenate the reports or have them run in a batch? Anyone? Thank you ......
 
You can use code like:
Code:
DoCmd.OpenReport "rptOne"
DoCmd.OpenReport "rptTwo"
DoCmd.OpenReport "rptThree"

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Ok, GREAT! Now how do I capture them and get them to print?
Thank you so much..this really helps
 
The reports should print with that code.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Is there also a way to specify how many times it prints?
This project requires reports to be run 4 times from a parameter query. The problem I have is that the parameters will -obviously- change each time it's run. Is there a way to have a macro or a module to automate this process? Or is that beyond the scope of Access? I am used to 4GL's with procedural code...
 
Store the report name and the number of times it must print in a table.

Don't ever use parameter prompt queries. There are several methods that raise the level of your applications.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top