ACCESS: How To: Install Short Delay in Module Code [RESOLVED]
Esteemed Forum Participants and Lurkers:
===============================
Access 2000 (XP) & '97
How do I insert a short in-line delay into my Module Code? I need about 250 milliseconds delay ... execute1, delay, execute2, delay, execute3
Thank you for any and all comments, suggestions, and assistance.
Re: ACCESS: How To: Install Short Delay in Module Code ???
You can use the Sleep API. ;)
VB Code:
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Re: ACCESS: How To: Install Short Delay in Module Code ???
Many Thanks RobDog ...
For clarification unto future generations ...
Insert this into the declaration area at the very top of your module:
Code:
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Here is the inline code:
Code:
DoCmd.Beep 'or whatever
Sleep(400)
DoCmd.Beep 'or whatever
Sleep(400)
DoCmd.Beep 'or whatever
Re: ACCESS: How To: Install Short Delay in Module Code ???
Hmm, lets see. 3 Beeps means no video or memory error? ;)
Re: ACCESS: How To: Install Short Delay in Module Code [RESOLVED]
No ... it means "If you forgot to wake up on the 1st beep, here are 2 more!"
Re: ACCESS: How To: Install Short Delay in Module Code [RESOLVED]
Sounds similar to one of my first programs I wrote. An alarm clock that called me on the phone because my regular alarm clock
wasnt loud enough :lol: