Calling a macro from scheduler

G

Guest

I inherited a database that when opened it pops up a form the does a thirty
second countdown. If it times out a macro is called and the database starts
updating from linked tables, if cancelled the users are directed to a
switchboard and begin working. Windows scheduler opens access at night to
allow the refresh macro to kick-off.

My question: Is there a way to redesign this so users can open the database
directly to the swiitchboard and still have the refresh macro called at night?

I want to avoid having the users cancel the refresh process and make that
part invisible to them.

Thanks,
Todd
 
S

Steve Schapel

Todd,

I am not sure why or how it is set up the way it is. Is there any
reason why the scheduler doesn't just run the refresh macro, and
otherwise just have the application open straight to the switchboard?

If you need specific help with this, please give us some more details of
the existing setup with scheduler and macros.
 
G

Guest

Steve,
I think it was more about the skills of the person who developed it than
any real need for that specific sequence of events.
I saw a reply you made to someone earlier about opening Access with and X
switch and macro name. I ried that and it opened the database but didn't fire
the macro.

C:\Program Files\Microsoft Office\Office10\MSAccess.exe
C:\Foldername\DBname.mdb /x test2
This approach is what I need if I can get it to work.

Otherwise I thought that I would try an on open event on the start-up page
that says: if hour(date) > 20 then do the macro.

Any thoughts on which is better.

btw - thanks for everything you guys do. I've learned a lot over the last
six months by lurking this site :)

Todd
 
S

Steve Schapel

Todd,

I think you will need to put ""s around the segments of the command
line, like this...
"C:\Program Files\Microsoft Office\Office10\MSAccess.exe"
"C:\Foldername\DBname.mdb" /x test2

Assuming test2 is the name of the macro, I think this should work.

Maybe the routing was in an AutoExec macro before, or else in a macro
that was assigned on the Open event of a form ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top