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

Running an Access Report in an automated fashion

Status
Not open for further replies.

bessebo

IS-IT--Management
Jan 19, 2001
766
0
0
US
I want to be able to run an Access report (with parameters) during off-hours in an unattended mode. What is the typical manner in which people run Access reports during off-hours. Our Access reports run off linked tables that are in SQlServer 7.0. Is there any way to set up a job in SQLServer that will run an Access job potentially with using an Operating System command line entry?

What is the best way to automate an Access report?

Thanks in Advance,
Bessebo
 
The way I achieve this is to use Windows Scheduled tasks... This will open your database at any time you want... All you have to do is to set a macro that runs your report when the Db is opened.


Hope this helps
 
Moonlight's method will work, but it will also generate a report EVERY TIME you open the database, and if you have multiple users or are just working on the db on a day-by-day basis then it could annoying. Another problem may occur if you have setup security on the DB and you have to put in a password. You can add a password to the shortcut in scheduler, but then you have the issue of "Why bother with security!?" To do what you want is relatively simple, but there are two schools of thought to how it can be done. So my question to you is whether this database will always be open on the machine that generates the report or do you need to open it on an as needed basis.

If you're going to have the db always open, you can use the timer event to check the time on the PC and then have it fire off the report at the times you desire. If you're going to open the db via scheduled tasks, then I'd do it like Moonlight said, but I'd also add some code to look at possibly the machine name (IE: the report running PC) then if the correct machine is going pop up a form that asks "Print this report?" Yes/No and set a timer on that form to print automatically if no answer in say 10 seconds.

HTH
Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top