By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,137 Members | 1,934 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,137 IT Pros & Developers. It's quick & easy.

How do I detect that there has been no activity on a form

P: n/a
How do I detect that there has been no activity on a form in an Access 97
Database

Paul

thanks


Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.
Nov 13 '05 #2

P: n/a
thank you
"fredg" <fg******@example.invalid> wrote in message
news:15*****************************@40tude.net...
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.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.