There is no setting, but you can use a hidden form which tests activity
every minute or so and will simply close the app when there is none. The
form's TimerInterval is set to 60000 (1 minute). This form is visible and
allows a user to move the mouse or keyboard over it and delay the closing
by
another 30 minutes. You could easily just remove that code, hide the form
and quit the app after the first 30 minutes. BTW, the form opens with the
app and has no way to close it without shutting down the app.
Option Compare Database
Option Explicit
Dim lngActivityCounter As Long
Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
'reset the timer
lngActivityCounter = 0
Me.Doomsday.Caption = 15
Me.Doomsday.Visible = False
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
'reset the timer
lngActivityCounter = 0
Me.Doomsday.Caption = 15
Me.Doomsday.Visible = False
End Sub
Private Sub Form_Timer()
'
'NOTE: The Timer Interval = 60000 (1 minute)
'If no activity by user for 30 minutes, then quit application
lngActivityCounter = lngActivityCounter + 1
'30 minutes = 1800 sec (30 min x 60 sec/min)
'After 30 minutes (1800 sec via: 20 min x 60 sec/min) of no activity,
'close application completely
If lngActivityCounter >= 30 Then
Beep
Me.Doomsday.Visible = True
If Me!Doomsday.Caption = 0 Then
DoCmd.Quit acQuitSaveAll
Else
' This counts down 15 seconds before quiting
Me!Doomsday.Caption = Me!Doomsday.Caption - 1
End If
End If
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access