Schedule Event Procedure (acOutputReport) to run Daily at specified time

swicked

New member
Local time
Today, 14:43
Joined
Jan 14, 2013
Messages
3
I have an Access 2007 database in which every morning I manually initiate an event procedure (DoCmd.OutputTo acOutputReport), by clicking a Button, to output 5 preformatted reports as a PDF into a specific folder.

This works great - though I'd like to schedule it to run Daily at 6AM.

Is this possible?
Is this the correct way to go about this?

Below you will see my procedure....

Any help would be greatly apprciated


DoCmd.OutputTo acOutputReport, "REPORT1", acFormatPDF, "C:\ AMREPORT\REPORT1.pdf"
DoCmd.OutputTo acOutputReport, "REPORT2", acFormatPDF, "C:\ AMREPORT \REPORT2.pdf"
DoCmd.OutputTo acOutputReport, "REPORT3", acFormatPDF, "C:\ AMREPORT \REPORT3.pdf"
DoCmd.OutputTo acOutputReport, "REPORT4", acFormatPDF, "C:\ AMREPORT \REPORT4.pdf"
DoCmd.OutputTo acOutputReport, "REPORT5", acFormatPDF, "C:\ AMREPORT \REPORT5.pdf"
 
I would create an mdb/accdb that performed your functions when it started up (autoexec macro calling a function or code in the load event of a form), then closed itself. Then I'd call that db from Windows Scheduled Tasks.
 
I have a Module and Macro create to run the event procedure - but due to security feature - I have to manually enable VBA macro.

Therefore once the Database is open I can run the Macro - but not have the macro run upon opening.

Is there a way around this or a way to schedule the macro to run, when I have the database open
 
Put the database in a trusted location:

Office Button/Access Options/Trust Center Settings
 

Users who are viewing this thread

Back
Top Bottom