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

Automatically generating reports at a certain time each day

Status
Not open for further replies.

GJP55

Technical User
Feb 2, 2003
220
GB

Is it possible with Access Projects to have a series of reports run automatically each day unattended ?.

I am currently developing a SQL Database and Access Project Frontend. We already have a collection of SQL updates running at a set time each morning and would also like associated reports to be generated at the same time. At the moment, the reports are run by a user clicking a button. The majority of the reports are normally sent via email from a module in Access.
 
This is a problem that i've been trying to solve for ages so would be very interested in any tips also.

The quick fix that i've settled with is to havethe reports execute at the first login of the day.

Leigh Moore
LJM Analysis Ltd
 
I would use the SetTimer API. This timer can easily have 24 hour intervals.

When the program first starts up, get the current time, and calculate how many seconds it will be until the Report Time comes around, and then set the System Timer accordingly. Once the Timer event fires, then you execute reports, and reset the timer for 24 hours (less the time to generate the reports) later to repeat the process again tomorrow.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
I generate some reports on Tuesday's and Fridays...I set up a "front end" that links to my database files...The "front end" application sends the reports on startup and then shuts itself down...To initiate that application, I used Windows task scheduler....it's worked like a charm.
 
Thanks for both replies.

Will set it up and see how I get on

Cheers
 


There are several way to do this. I agree with badfinger66, I would recommend making a .bat file to run a macro. Then schedule the file to run twice daily. This way you avoid having to have the file open all the time.

example of a .bat file(just a text file with the following in it and with the .bat instead it .txt extension)

contents:
"C:\Program Files\Microsoft Office\Office10\msaccess.exe" c:\yourfolder\yourdatabase.mdb /x nameofmacro /cmd username:password

You may not need a username or password so just leave it out.

Then go to control panels and "tasks" to schdule the .bat file you just made.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top