Inactivity Close database

R

Rpettis31

Is there code that can close the database after a period of inactivity?
I have users that forget to sign out of the database at night and I am
unable to update the database tables.
 
J

Jeff Boyce

Try searching on-line or at mvps.org/access for "inactivity".

The generic notion is that you'll create a form that the application opens
'hidden', then turn the Timer on in that form. Every so many minutes the
Timer event will check the current time and compare it to your "shutoff"
time. This gives you a way to automatically shut down any open instances at
'end-of-day'.

If you want a true "inactivity" shut down, it's a little more complex, in
that you need to keep track of where someone is right now (which form, which
control), then check again (in ?10, 20, 30 minutes) to see if they are still
there. If they are, they aren't really there and you can have Access shut
down. This will close out those folks who launch it in the morning and then
go to lunch without shutting it down.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
T

Tony Toews [MVP]

Rpettis31 said:
Is there code that can close the database after a period of inactivity?
I have users that forget to sign out of the database at night and I am
unable to update the database tables.

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
 
L

LisaInAz

Would this go in the front end or back end? I want to assume frontend

Also could I use this to "save" the record being worked on due to inactivity?
I have a multi user application, customer states if they get distracted,
when they come back they need to enter windows password to gain access to
system, they say when they go back to their record data was not saved.

Any suggestions are appreciated
 

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