MS Access -How does one know when macro has terminated

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Michel
Newbie
Posts: 17
Joined: Fri May 20, 2011 2:12 pm
Location: Ottawa

MS Access -How does one know when macro has terminated

Post by Michel » Wed Jul 20, 2011 4:35 pm

G'day,

How does one know when an MS Access Macro has completed-?

To start a macro is as follows:

http://www.mjtnet.com/usergroup/viewtop ... &view=next

However, if for example I'm exporting a table to EXCEL file - I need to know when the export is completed before:

- KillProcess>MSACCESS.EXE
and
- moving on with the next step of the Macro Scheduler

Cheers & thanx

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Jul 20, 2011 6:03 pm

A couple of methods I've used.

1) Make the last line of the Access Macro Quit/Exit Access then have Macro Scheduler wait for Window "Access*" to close

2) If you don't want to close Access, make the last line of the Access Macro a message box, then have Macro Scheduler wait for a window with the message box name to open.

Michel
Newbie
Posts: 17
Joined: Fri May 20, 2011 2:12 pm
Location: Ottawa

Post by Michel » Wed Jul 20, 2011 6:10 pm

Idea #2 - Brilliant-!

I just had the epiphany on idea #1

Merci JRL

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts