Schedule a task in access

rookie_user1

Registered User.
Local time
Today, 05:27
Joined
Jul 14, 2006
Messages
22
Hi i would like to know if it is possible to schedule a a task in access, at the moment i refresh all my excel report by using a button on a form in access and would like ot know if i can do this automatically
 
Depends. Paul's way works if you want the event to occur when you are logged in to the Access database and have the form open. If you cannot guarantee that this will always be the case, chime in with a (very) slightly more detailed explanation of your requirements.
 
This sounds better and more of what i think would work for me.
What i have is a form with 1 button on it, when pressed it updates excel files by refreshing them, through the pivot table.

How would i go about creating the bat file that opens Access and passes the name of a macro as an argument. This Macro i assume would be use to press the button ? I've also a pop up thats an update query that needs attention by selecting yes to when the button is pressed...
 
Pat's on track with this. (As usual for Pat.)

Look up Access help on COMMAND LINE actions. I think it is /X macroname that will do what you want.

First, build a macro that performs the TransferSpreadSheet action that is required for your external update.

Second, include a Quit action at the end of the macro. Do not attempt to start the next step until the macro, once started, correctly exits from the application. You are NOT done until this is true.

Third, create an extra Icon that points directly to the .MDB file, created as a shortcut on your desktop.

Fourth, open the Icon to see its properties. (This is just a right-click operation, click on "Properties").

Fifth, edit the "Target" line on the "Shortcut" tab-page to include "/X macroname" where you supply the correct name of the macro. HINT: Keep the name simple.

Sixth, get into the Windows task scheduler. Schedule the icon to run at your desired time/frequency.
 
ok i've my batch file built, but the problem i have now is to get the button pressed,

Can i create a macro to press the button within the onclick command. What action would i use in the Macro to do this ?
 

Users who are viewing this thread

Back
Top Bottom