Hi... looking for best ways to use Windows task scheduler to open up Access (not hidden!), run a macro, and auto close. Say once a day. Use a batch file maybe? Sample code please? Thanks!!!
Look into VBScript that opens access (set obj = createobject("access.application"), then set db=obj.opencurrentdatabase("path"), then access vba from there.
No ideas about macros, wouldn't use one. use vba instead.
or just use the windows task to open a database that's set to run something when it opens (startup form, form_load event code, code includes application.quit).
Hi... looking for best ways to use Windows task scheduler to open up Access (not hidden!), run a macro, and auto close. Say once a day. Use a batch file maybe? Sample code please? Thanks!!!
Put MSAccess.exe in the Program to Run Setting.
Add the appropriate command line setting to open a specific accdb and run a specific macro when that accdb opens. For details, you can search online for command line options for Access.