Hi,
I'm trying to build a sort of closing application so that my boss can kick everyone out of the Access program. I want to do this with a check button that can be put as true by the boss which will close everyone's open application.
It must be done by some 30 min loop that checks if the checkbox is true or not.
So far I have come to this:
I'm just a bit stuck here since I have no experience with loops at all.
My guess and my hope is that this is child's play for some of you
Thanks
I'm trying to build a sort of closing application so that my boss can kick everyone out of the Access program. I want to do this with a check button that can be put as true by the boss which will close everyone's open application.
It must be done by some 30 min loop that checks if the checkbox is true or not.
So far I have come to this:
Code:
' To make it pause for half an hour before continuing
Public Function Pause(NumberOfSeconds As Variant)
On Error GoTo Err_Pause
Dim PauseTime As Variant, start As Variant
PauseTime = NumberOfSeconds
start = Timer
Do While Timer < start + PauseTime
DoEvents
Loop
Exit_Pause:
Exit Function
Err_Pause:
MsgBox Err.Number & " - " & Err.Description, vbCritical, "Pause()"
Resume Exit_Pause
End Function
Private Sub Form_Open(Cancel As Integer)
If Me.Stoppennw = True Then
Application.Quit
ElseIf Me.Stoppennw = False Then
Pause (1800)
' No idea how I build in the loop here to make it look at the checkbox again
End If
My guess and my hope is that this is child's play for some of you
Thanks