Access and Excel

  • Thread starter Thread starter joannele71
  • Start date Start date
J

joannele71

Hi

I have a macro in Access. Can I schedule to run that macro automatically
daily? If yes, how?

Also, can I write a macro in Excel to run the Access macro?

Thanks
Joanne
 
Hi Chris,

Thank you for your help.

I have this command in my scheduled task. Does this look alright?

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "
w:\bond\joanne\daily\index.mdb" / x dailyUpdate

But it gave me an error message when the scheduled task run. Here is the
message:

The command line you used to start Microsoft Office Access contain an option
that Microsoft Office Access doesn't recognize.

Thanks
Joanne
 
The Scheduler runs under a security context that doubtlessly doesn't have a
W drive mapped. Try usin a UNC ( \\server\share ) instead of a mapped drive.
 
Thank you very much Chris. It works!!!!

My next problem is that Access gives me a security warning popup so I have
to click OPEN before the macro can run. How can I get rid of this warning?

Also, since the first step of my macro is to run commond to link the Table
Manager, the Linked Table Manager screen pop up. then I have to check the
linked table and click ok twice and close. After all these manual works, the
macro will then continue. Anyway to pre-set all these standard clicks?

Many thanks
Joanne






Chris O'C via AccessMonster.com said:
The error message is because you have an extra space between the slash and
the X (which is the command that means "run the following macro when you open
the db"). Remove the space between the two characters so that this part of
the command line looks like this:

/x dailyUpdate

Also, it's hard for me to tell from the way the editor breaks up the line of
text, but it appears that you have an extra space after the opening quote and
before the w:\ in the path to your db.

If the editor allows me to show it correctly, this should be all one line:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "w:\bond\joanne\
daily\index.mdb" /x dailyUpdate


Chris
Microsoft MVP

Hi Chris,

Thank you for your help.

I have this command in my scheduled task. Does this look alright?

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "
w:\bond\joanne\daily\index.mdb" / x dailyUpdate

But it gave me an error message when the scheduled task run. Here is the
message:

The command line you used to start Microsoft Office Access contain an option
that Microsoft Office Access doesn't recognize.

Thanks
Joanne
Windows task scheduler will run tasks for you daily if you set it up. The
command line to run a macro would look like this (all one line):
[quoted text clipped - 14 lines]
Thanks
Joanne
 
Back
Top