Hi,
I was curious to know how one sets up a macro in Access to autorun reports at a specific time? I've not used macros in Access yet so please-if you can- be very detailed. Thank you...
Hi,
the best bet is to do the following.
1. Create a new database and link in the tables and queries required to create the report.
2. Create a form (call it frmStartUp or something similar)
3. In design view of the form, open the form properties dialogue
4.Click on the Events Tab, click into the Open Event.
5. Click on the ellipses (3 dots) to the right.
6. Select 'Code Builder'
7. Enter the following code:
8. Save and close the form.
9. Go to Tools --> Startup
10. From the 'Display Form/Page' combo select the startup form.
11. Close the database.
Now every time you open that sepecific database, the report(s) will print and the Db will close. So
12. Create a scheduled task to open the database at the time you require to run the report.
I would just create an Autoexec macro with the OpenReport command. Look up MACROS, and "Autoexec" macro. Also look up Windows Task Scheduler--if you have Windows, you can launch the db to open at a certain time. On opening of the db, the Autoexec macro runs.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.