Detect Idle Time Form

K

Kat3n

I've included the code to detect idle time in a database (Article ID 210297)
and every time I tested it worked perfectly. Yet, some of my users complain
that it closes the database even when they are actively typing. What could
cause this to happen? The database was created in Access 2000.
Thanks in advance.
 
K

Keith Wilby

Kat3n said:
I've included the code to detect idle time in a database (Article ID
210297)
and every time I tested it worked perfectly. Yet, some of my users
complain
that it closes the database even when they are actively typing. What could
cause this to happen? The database was created in Access 2000.
Thanks in advance.

IIRC it's because that code relies on you moving from control to control, so
if a user stays in a text box typing away it will time out. You need to
code to mitigate this scenario. I did do this some time ago and I will see
if I can find the code and post back.

Keith.
www.keithwilby.com
 
K

Kat3n

The typing in a single field is exactly what is happening! I could sure use
the code that will recognize the keystrokes! Thanks in advance.
 
K

Keith Wilby

Kat3n said:
The typing in a single field is exactly what is happening! I could sure
use
the code that will recognize the keystrokes! Thanks in advance.

I think that's why I stopped using it in the end, the best I could come up
with was to have a globally available flag (blnFirstTime) that reset the
counter in various events (eg Filter, Apply Filer, Current ... etc).

If (PrevControlName = "") Or (PrevFormName = "") _
Or (ActiveFormName <> PrevFormName) _
Or (ActiveControlName <> PrevControlName) Or blnFirstTime = True
Then

Sorry I can't be of more help.

Keith.
 
M

missinglinq via AccessMonster.com

Not familiar with Article ID 210297 but my guess is that there's some way to
set your "idle time" before closing your app, and you probably need to set
this a good deal longer than it's currently set at. The general idea behind
idle detection code is to not allow someone to leave the office for a long
lunch or to go home at night and leave the db running, not to close it down
if nothing's been done for 15 or 20 minutes. Most users (including myself)
would be ticked off to have someone stop by for a short chat about something,
only to find that they have to reopen the database because it's been
automatically closed.

Having said that, one approach would be to disarm, if you will, idle
detection on the control's GotFocus and rearm it on the control LostFocus
event.
 
K

Keith Wilby

missinglinq via AccessMonster.com said:
Not familiar with Article ID 210297 but my guess is that there's some way
to
set your "idle time" before closing your app, and you probably need to set
this a good deal longer than it's currently set at. The general idea
behind
idle detection code is to not allow someone to leave the office for a long
lunch or to go home at night and leave the db running, not to close it
down
if nothing's been done for 15 or 20 minutes. Most users (including myself)
would be ticked off to have someone stop by for a short chat about
something,
only to find that they have to reopen the database because it's been
automatically closed.

When I used it I had it set to an hour and I still had occasional complaints
so I stopped using it. I find instances of people leaving the apps open
overnight or over a weekend pretty rare. If I need to take apps offline now
I have other methods to kick users out.

Keith.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top