Re: Command Button Question



If you look at the second solution I gave (the one that changed the text
colour, then changed it back 2 seconds later), you'll see that I set the
form's TimerInterval (to 2000 in that case, which corresponds to 2 seconds),
andd put code in the form's Timer event which did something and then set the
TimerInterval back to 0.

If that's all you'll be using the timer for, you could put the call to
AddVisitor in that event, so that it waits 2 seconds before firing.

Another alternative would be to use the Sleep API. There's an example at
http://www.mvps.org/access/api/api0021.htm on "The Access Web"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Mr-Re Man" <MrReMan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AAED0216-0097-4718-B9AE-38322C2DD5FC@xxxxxxxxxxxxxxxx
Ah, I see, would it be at all possible to wait for a timer to expire
before
using the Call action or doesn't it work like that?

"Linq Adams via AccessMonster.com" wrote:

I suspect that the Doug's first code is actually changing the caption,
but
that the single line of code

Call AddVisitor("Residents Parking", "EC")

doesn't allow the new caption to appear long enough for the human eye to
register the change before it reverts back to the old caption. Access/VBA
doesn't halt execution of code; once AddVisitor() is called it continues
to
the next line, resetting the caption. You're talking about a mere
fraction of
a second here.

The fact that you're already using the Timer does, of course, complicate
using his second code example.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com




.