LogUsersOff.mdb (intermediate)

Please consider donating $1 per sample downloaded, find out why here
Access 97 (23 KB)

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.




Need Winzip?

Return to Main Page