I'm using the following code to auto-refresh a form's contents every 1.5 minutes.
Private Declare Sub sapiSleep Lib "kernel32" _
Alias "Sleep" _
(ByVal dwMilliseconds As Long)
Sub sSleep(lngMilliSec As Long)
If lngMilliSec > 0 Then
Public Sub timeRefresh()
Const cTIME = 90000 'in MilliSeconds
My problem: Even with the DoEvents the code above prevents the user from using their system because the sleep routine basically hogs the processor.
I need to run an event every 1.5 minutes from MS. Access and I need the system's resources to be available to the user whilst the application is waiting.