General discussion

Locked

Step Delay in Access Macro

By c-mackenzie ·
Hi, does anyone know how to put a delay in an access 2000 macro ? The final step in my macro is to Exit from my Access Database and close down the application, however, this final command isn't running properly because the second last process in my macro runs another database which when opened runs its' own auto executing macro which can take up to ten minutes to run. I need to set up a delay in between the final two steps to prevent the initial macro throwing up an error when it finishes. Ideally I need a break of about 15 minutes to give plenty of time for the other DB macro to complete. I can't run the two separately because I have to be certain the steps in my first macro are run before the 2nd to last process is run in it.

Many thanks in advance

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by ESchlangen In reply to Step Delay in Access Macr ...

The quick and dirty way would be to do something like this:

Dim x As Date

x = Now()

Do While DateDiff("n", x, Now()) < 15
Loop

This will cause the program to constantly test for the difference in minutes until that difference is 15. Then the remainder of the program will run.

Collapse -

by c-mackenzie In reply to

Poster rated this answer.

Collapse -

by c-mackenzie In reply to Step Delay in Access Macr ...

Thanks I'll give this a try

Collapse -

by c-mackenzie In reply to Step Delay in Access Macr ...

This question was closed by the author

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums