On Tue, 1 Jun 2004 23:13:06 +0100, dude wrote:
How do I detect that there has been no activity on a form in an Access 97
Database
Paul
thanks
How long a period of time is no activity?
5 minutes?
Add an unbound control to the form. name it [StartTime].
Set it's Visible property to No (or Yes if you wish to show it).
Code the Form's Load event:
[StartTime] = Time
Code the Form's KeyPress event:
[StartTime] = Time
Set the Form's Timer Interval to 1000
Code the Form's Timer event:
If DateDiff("n", [StartTime], Time) = 5 Then
' Now what? Close the Form?
DoCmd.Close acForm, Me.Name
End If
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.