Brett Barabash
BBarabash at TappeConstruction.com
Wed Feb 19 08:00:01 CST 2003
Or place a DoEvents between each query, to allow the screen to update. Whichever is easier for you! <VBG> -----Original Message----- From: Drew Wutka [mailto:DWUTKA at marlow.com] Sent: Tuesday, February 18, 2003 8:23 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] suspend execution of VB code Use the following code. Watch for word wrap on the API Calls. This function uses an API to delay your code by x number of milliseconds...without cycling your processor over and over. Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Declare Function CreateWaitableTimer Lib "kernel32" Alias "CreateWaitableTimerA" (ByRef lpTimerAttributes As Long, ByVal bManualReset As Long, ByVal lpTimerName As String) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Private Function DelayRoutine(intMilliseconds As Long) Dim dwReturn As Long Dim intTimer As Long intTimer = CreateWaitableTimer(0, True, "MicrosoftAccessDelay" & Chr(0)) dwReturn = WaitForSingleObject(intTimer, intMilliseconds) CloseHandle intTimer End Function Drew -----Original Message----- From: Scott Gage [mailto:scotttgage at yahoo.com] Sent: Tuesday, February 18, 2003 7:47 PM To: accessd at databaseadvisors.com Subject: [AccessD] suspend execution of VB code HELP! I need to slow down the code I'm running. It is running a ton of append queries to groom some data. I thought I'd make a progress dialog box while I'm at it. I will need the code to suspend execution for a few seconds and then start back up without any end user action. Can anyone point me in the right direction? I read Break point but the end user has to do something to start the code back up. Scott ===== -------------------- Scott T. Gage Scott.gage at promedica.org 419.291-7177 __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com