G
Guest
The following code is supposed to run to log users out of the database every
night (always x amount of seconds after they logged in in the morning). I
used to run it on a form but everytime the form was used the countdown would
stop so i'm running it through a module instead, however the form doesn't
load properly with this code and when it does the txtExitCountDown is not
constantly being refreshed.
Public Function Exiter()
Dim OriginalTime As Long
Dim ExitTime As Long
OriginalTime = Timer
ExitTime = OriginalTime + 40000
Do Until Timer > ExitTime
[Forms]![frm_Main]![txtExitCountdown] = "(" & Round((ExitTime - Timer),
0) & ")"
DoEvents
Loop
DoCmd.Quit
End Function
night (always x amount of seconds after they logged in in the morning). I
used to run it on a form but everytime the form was used the countdown would
stop so i'm running it through a module instead, however the form doesn't
load properly with this code and when it does the txtExitCountDown is not
constantly being refreshed.
Public Function Exiter()
Dim OriginalTime As Long
Dim ExitTime As Long
OriginalTime = Timer
ExitTime = OriginalTime + 40000
Do Until Timer > ExitTime
[Forms]![frm_Main]![txtExitCountdown] = "(" & Round((ExitTime - Timer),
0) & ")"
DoEvents
Loop
DoCmd.Quit
End Function