Macro Scheduler's WebRecorder builds code as you navigate a site. Use the built in IE functions and IE Object Wizard to easily add code that connects to the underlying HTML elements. It seems that the best way to automate your tasks is to: i) run your queries automatically by building a macro that runs you desired queries and then exits Access. Ii) The next step would be to create a batch file that opens Microsoft access and runs the desired macro. The file would contain some command such as: 'C: Program.
Active5 years, 10 months ago
MARS™ (Microsoft® Access Reports Scheduler) is a dynamic, flexible, function-rich and intuitive automation task scheduler to run access macros. Just define single or packages of reports, queries or macros, schedule, run them automatically and send the reports to print, fax, folder, FTP, SMS, DropBox, Sharepoint & email in a number of standard formats including Excel, Word, PDF and more. I believe you must select 'Run only when user is logged on' in your Windows Task Scheduler Job Properties. You must also be logged on to automatically have scheduled Access macros run. This really seems like a huge limitation of Access, but I have not seen another solution out there.
I'd like to have a macro, called Macro1, for example, run every day at 9 AM. It works great on its own from the VB code editor in Access 2007 but I would like it to be able to execute automatically without access being open.
Please note that I don't want there to have to be any human intervention, it needs to be able to run automatically without someone opening Access to trigger autoexec or onload or something similar.
Is this at all possible?
Access Macro Examples
alexcocoalexcoco![Run access macro task scheduler Run access macro task scheduler](/uploads/1/2/6/8/126883149/998440384.png)
5,21255 gold badges2222 silver badges3737 bronze badges
3 Answers
You can use a MS Access command line switch to run a macro. If you search for 'commandline' in Access help, the topic 'Startup command-line options' gives you all the commandline switches. The switch for running a macro is
x macro
.So, if you write your macro to run whatever you want and have it exit Access when it finishes, you can then create a commandline that will do the trick and put it in a batch file that the Windows Task Scheduler can execute.
However, as I said in a comment above, if you are just running some queries, I'd say it makes more sense to bypass Access entirely and use DAO directly in a scheduled vbScript to execute the queries.
David-W-Fenton![Access Macro Scheduler Access Macro Scheduler](/uploads/1/2/6/8/126883149/564228797.jpg)
21.4k33 gold badges3939 silver badges5353 bronze badges
You can use Windows Task Scheduler and VBScript to run code or start Access.
FionnualaFionnuala85.9k77 gold badges9696 silver badges133133 bronze badges
You must create vbscript to run your macro and create a batch file to schedule your vbscript.
- vbscript code, save this as schedule.vbs fileDim accessApp
set accessApp = createObject('Access.Application')accessApp.OpenCurrentDataBase('fullpathmsaccessdb')accessApp.Run 'Macroname',param1, param2,param3
accessApp.Quit
set accessApp = nothing - THEN create file.bat@echo off
cscript schedule.vbs
and your ready to schedule it using the windows task scheduler http://www.thewindowsclub.com/how-to-schedule-batch-file-run-automatically-windows-7
hope this help :D
noodlenoodle