Option Compare Database
Dim MyTime As Date
Private Sub Form_AfterUpdate()
MyTime = Now()
End Sub
Private Sub Form_Current()
MyTime = Now()
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
MyTime = Now()
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MyTime = Now()
End Sub
Private Sub Form_Open(Cancel As Integer)
MyTime = Now()
End Sub
Private Sub Form_Timer()
If MyTime = Empty Then MyTime = Now()
If Now() >= DateAdd("n", 1, MyTime) Then
DoCmd.Close
DoCmd.OpenForm "LogIn"
End If
End Sub