Time a User out of Access 2000 database

E

Elliott

Is there any way to time a user out of an Access 2000 database after a
certain amount of time through Access or any way that will not corrupt the
Access database?
 
P

(PeteCresswell)

Per Elliott:
Is there any way to time a user out of an Access 2000 database after a
certain amount of time through Access or any way that will not corrupt the
Access database?

To what end?

One thing I've done is put a timer event in some form that is always open
(although sometimes invisibly).

The timer event checks for the existence of a .txt file - something like
"KillFile.txt". If it finds that file, it issues a notification to the user
that the app will be shut down in so-and-so many seconds unless they click a
certain button.

I've used this approach to deal with users that would otherwise routinely leave
the app open 24-7 when I need to do a DB update or, in some cases, when the LAN
backup software has issues with open files.
 
D

DaveK

Pete,
Can you provide sample code for doing what you describe below? I have an
application for which I would like to apply this technique so I don't have to
chase users down to close it when I need to make a change to it.

Your help would be greatly appreciated.
 
T

Tony Toews

DaveK said:
Can you provide sample code for doing what you describe below? I have an
application for which I would like to apply this technique so I don't have to
chase users down to close it when I need to make a change to it.

HOW TO: Detect User Idle Time or Inactivity in Access 2000 (Q210297)
http://support.microsoft.com/?kbid=210297
ACC: How to Detect User Idle Time or Inactivity (Q128814)
http://support.microsoft.com/?kbid=128814

However we found that the code which runs on the timer event must be
disabled for the programmers. Otherwise weird things start happening
when you're editing code.

Also print preview would sometimes not allow the users to run a menu
item to export the report to Excel or others. So you had to right
click on the Previewed report to get some type of internal focus back
on the report so they could then export it. This was also helped by
extending the timer to five minutes.

The downside to extending the timer to five minutes was if a person
stays in the same form and at the same control for considerable parts
of the day, ie someone doing the same inquiries, the routine didn't
realize that they had actually done something. I'll be putting in
some logic sometime to reset this timer whenever they do something in
the program.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
P

(PeteCresswell)

Per Tony Toews:
However we found that the code which runs on the timer event must be
disabled for the programmers. Otherwise weird things start happening
when you're editing code.

Also, if you have error trapping/logging code in place that maintains a stack of
procedure calls, my experience is that it causes problems if implemented in the
Timer() routines.
 
T

Tony Toews

(PeteCresswell) said:
Also, if you have error trapping/logging code in place that maintains a stack of
procedure calls, my experience is that it causes problems if implemented in the
Timer() routines.

Ah, interesting. I haven't done that but I see how it could cause
troubles.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Top