Ever wonder how you can automatically logout idle users of an Access database?
Checking on the inactivity time is pretty simple...
1) Create a little form which gets open with the HIDDEN attribute when the
2) Set the interval timer to some amount of time. Remember the
interval timer is in milliseconds so 1000 ms is 1 second. I suggest you
set it to about 30 seconds (30000 ms).
Did you know that most template databases often do not do exactly what you need done? We can create a custom template that fits your needs exactly.
3) Create a visual basic procedure in the On Timer event of the form.
4) Copy and paste the Microsoft.com VBA code for detecting user inactivity
in this article:
Detect User Idle Time or Inactivity
5) Find the line of code: Const IDLEMINUTES = 2
You can change the idle time minutes to whatever time in minutes you would like.
You might want to change it to a 20 for 20 minutes.
*** Now we have a downloadable Microsoft Access example database showing how
to logout inactive users! Go to our example download page for
Inactivity Logout VBA Code.