Avoid Using DoEvents to Wait in Microsoft Access, VBA, and VB6

In our Microsoft Access, VBA, and VB6 programs, we often need to pauseprocessing for a certain period of time, or until a specific time, and thencontinue processing. One common way to do this is to use the DoEvents function in a loop whilewaiting, however, this method consumes the CPU time and slows down the PCconsiderably. This is a significant problem when pausing for more than a coupleof seconds, when users will notice the slowdown. Use the Sleep command instead.

Learn more about our royalty-free MicrosoftAccess/VBA/VB6 module code.