Access 2003: How do I run an internal Access macro externally

G

Guest

Without opening the database and running the macro manually, how would I set
a task to open the database and run the macro automatically?
 
J

Jeff O via AccessMonster.com

Rob, We do this quite a bit for database task that we have on a seperate
server that does nothing but log into our database and perform different
tasks. we simply build do the following:

1. Build the macro
2. Build a batch file and cal FULL path to database and pass the macro name
using the "X" arg.:
e.g
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" d:\stars\stars.mdb
/wrkgrp "d:\stars\security.mdw" /user batch /x check_consistency_email

It works GREAT!

/Jeff
 
G

Guest

Hey Jeff,

That works great!!! Thanks....

Now, How can I tell that batch file to close MS Access?
 
J

Jeff O via AccessMonster.com

Rob, Glad you found it works for you. To close MS access AFTER your macro
has completed it's work, simply put a "quit" as the last thing the macro does.
Change the "options" for the quit to (saveall) for saveing ALL without
prompting.

/Jeff

Hey Jeff,

That works great!!! Thanks....

Now, How can I tell that batch file to close MS Access?
Rob, We do this quite a bit for database task that we have on a seperate
server that does nothing but log into our database and perform different
[quoted text clipped - 13 lines]
 
G

Guest

Thanks a lot Jeff..... Awesome help....

When Q&A was big, I was pretty good at it but access is another story.....

THX

Jeff O via AccessMonster.com said:
Rob, Glad you found it works for you. To close MS access AFTER your macro
has completed it's work, simply put a "quit" as the last thing the macro does.
Change the "options" for the quit to (saveall) for saveing ALL without
prompting.

/Jeff

Hey Jeff,

That works great!!! Thanks....

Now, How can I tell that batch file to close MS Access?
Rob, We do this quite a bit for database task that we have on a seperate
server that does nothing but log into our database and perform different
[quoted text clipped - 13 lines]
Without opening the database and running the macro manually, how would I set
a task to open the database and run the macro automatically?
 
J

Jeff O via AccessMonster.com

You very welcome Rob...Anytime...

/Jeff

Thanks a lot Jeff..... Awesome help....

When Q&A was big, I was pretty good at it but access is another story.....

THX
Rob, Glad you found it works for you. To close MS access AFTER your macro
has completed it's work, simply put a "quit" as the last thing the macro does.
[quoted text clipped - 14 lines]
 

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