I tried putting the following code in the form unload procedure, but although it does generate the correct message, it doesnt stop the form from closing.
Private Sub Form_Unload(Cancel As Integer)
If [Starttime] > 0 And [Admin_time] = 0 Then
response = MsgBox("Please click on the stop button to stop the clock")
Exit Sub
End If
end sub
If the above condition holds, I want the user to click on the stop button before they close down the form. I'm guessing that the form is already commited to closing before the unload event?
Private Sub Form_Unload(Cancel As Integer)
If [Starttime] > 0 And [Admin_time] = 0 Then
response = MsgBox("Please click on the stop button to stop the clock")
Exit Sub
End If
end sub
If the above condition holds, I want the user to click on the stop button before they close down the form. I'm guessing that the form is already commited to closing before the unload event?
