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!

automate report running

Status
Not open for further replies.

tizwaz

Technical User
Aug 8, 2002
437
GB
Can anyone help? I have a report which has a field called CostCentre. I want to run a series of reports one for each cost centre each month. I can base my report on a parameter query and manually input the cost Centre and then save each one but it is quite long winded. Is it possible to automate using VBA? If possible I would also like to automatically email a copy to the budget holder for that cost centre. This is not yet a field in my database but I can easily add a table with budget holder and cost centre to it.

I'm thinking some sort of loop but not sure how to go about it.
 
You could create a table of reports with the report name, a cost center filter value/string, the send to information, etc. Then have code that opens a recordset of this table and steps through the reports and runs each one.

I think there is lots of code samples here and other places on creating DAO recordsets, applying where conditions, and sending reports in emails.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top