Good morning all,
I am trying to generate a bunch of report every night.
The report originate in a MS Access database.
We publish the report in a pdf format on a folder.
Each filename is refer to on an intranet web page where users can click on the desired reprot and it open up in pdf.
To get the report in pdf, i created a button on the database switchboard called " Publish Report"
I then wrote (with some assistance from my IT Dept. ) a little code as an event procedure when you click the button. it look like this for each report:
DoCmd.OpenReport "rpt WCC DAILY MORNING REPORT SS REPORT", acViewPreview, "", "", acNormal
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
DoCmd.Close acReport, "rpt WCC DAILY MORNING REPORT SS REPORT"
So to automate this, i create a macro in Macro Express that :
Open the database file. (Autoexec macro within the database open up the switchboard form)
Delay 15 seconds (to make sure it all load up properly)
Text type "Enter" (The button has focus as it is the first selection in the tab order in Access)
Once this run, the code "print" each report using the pdf printer to get the pdf report where we want it.
So my question to you all is what is the best way to get the macro to select the button and execute it.... A few nights it did not ran as planned even though the schedule time nad macro express were all set properly.
Should i use a Get focus or other function versus the text type ???? or can i run a MS Access macro directly from Macro Express, bypassing the text type and all....
FYI, we had the "publish macro" in Access setup in the autoexec macro before, but as we add report, the execution time was too long every time we open up the database...
Thanks for any input....
Seabass