Access 97 - Macro Question

  • Thread starter Thread starter dbain30
  • Start date Start date
D

dbain30

I don't have a lot of experience in Access so I'm using macros rather
than writing actual code. So far this is working out well except that
I have an instance where I'd like to have a pause between two items.
Is it possible to do this? Can I create some type of timer that would
provide a 5-10 second pause and then proceed?

Any help would be appreciated!
 
dbain30 said:
I don't have a lot of experience in Access so I'm using macros rather
than writing actual code. So far this is working out well except that
I have an instance where I'd like to have a pause between two items.
Is it possible to do this? Can I create some type of timer that would
provide a 5-10 second pause and then proceed?

Any help would be appreciated!

It has been a while since I worked with Access 97, that is an old one,
but I seem to recall that there was a way to add a pause using a micro.
Maybe I used VBA, I am not sure. Keep looking and see if anything looks
good. Maybe someone else will remember and post a solution for you. Good
Luck

In any case it is possible to do using VBA.
 
Macros are not really powerful enough to do what you ask.

The other major frustration is that they provide no way to handle errors,
not to mention how frustrating they can be trying to handle lots of cases in
the Condition column. They are okay for starting out, but if you are serious
you will need to dive into code eventually.

In code, you could pause 10 seconds like this:

Dim dtEnd As Date
dtEnd = DateAdd("s", 10, Now())
Do While Now() < dtEnd
DoEvents
Loop

Or, for a more complex version that works in milliseconds:
http://www.mvps.org/access/api/api0021.htm
 

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

Back
Top