Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - LogUsersOff.mdb (intermediate)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Please consider donating $1 per sample downloaded, (find out why here)

LogUsersOff.mdb (intermediate)

 Post Reply Post Reply
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP

Joined: 20 Feb 2008
Status: Offline
Points: 261
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: LogUsersOff.mdb (intermediate)
    Posted: 01 Aug 2008 at 12:48am

Please consider donating $1 per sample downloaded, find out why here.


This sample illustrates how to automatically log all of your users out of an application for maintenance purposes.

There are several pieces:

1) code in the switchboard form OnTimer and OnLoad events

2) a linked table called 'Settings' with only one Yes/No field called 'Logoff'

3) frm_ExitNow modal form

4) code in frm_ExitNow OnTimer and OnLoad events

When you change the value of Logoff in the Setting table to Yes, the users will get a message on the screen telling them that they will be logged off in 5 minutes. The Switchboard form checks this field every 5 minutes and launches the message form. If they still have not logged off after another 5 minutes, they will be automatically logged off. It will also not allow anyone else to log into the application until Logoff is set back to No.

This sample is based on an article by Bill Woodcock in the May 1999 Access-Office-VB Advisor.
Access 97 (23 KB): uploads/5/

Access 2000 mdb (33 KB): uploads/5/

Access 2010 accdb (47 KB)* : uploads/5/
With auto-relinking code provided by Daniel Pineault | CARDA Consultants Inc.

Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links

Back to Top
carlrj View Drop Down
Admin Group
Admin Group

Joined: 31 Dec 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote carlrj Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 3:55pm
Access 2010 (accdb) version added with auto-relinking code added by Daniel Pineault.
--Roger Carlson
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.