Print Page | Close Window

LogUsersOffNonUse.mdb (intermediate)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=327
Printed Date: 25 Sep 2020 at 4:55am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: LogUsersOffNonUse.mdb (intermediate)
Posted By: Roger Carlson
Subject: LogUsersOffNonUse.mdb (intermediate)
Date Posted: 01 Aug 2008 at 12:45am

Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .
 

LogUsersOffNonUse.mdb

This sample illustrates how to automatically log your user out of an application after a period of inaction.

There are several pieces:

1) code in the switchboard form OnTimer and OnLoad events

2) frm_ExitNow modal form

3) code in frm_ExitNow OnTimer and OnLoad events

The difficult thing here is deciding what INACTION means. I have chosen to define it as a period in which none of the controls at the bottom have received the focus. In the OnGotFocus event of each control, I call the sub routine UpdateActivity, which simply sets the current time (Now) into a record in the table tblLastUsed.

I have set the value to 1 minute for testing purposes. You change this by setting the TimerInterval in the form properties. ( 1000*Number of seconds ) You also need to set the value in the Timer Event of the form (see the code for instructions)
 
Download

Access 2010-2019 accdb:  uploads/5/LogUsersOffNonUse_2010.zip" rel="nofollow - LogUsersOffNonUse_2010.zip
Access 2000 DAO (25 KB):  http://www.rogersaccesslibrary.com/forum/uploads/5/LogUsersOffNonUse2k.zip" rel="nofollow - uploads/5/LogUsersOffNonUse2k.zip
Access 97 (22 KB): http://www.rogersaccesslibrary.com/forum/uploads/5/LogUsersOffNonUse97.zip" rel="nofollow - uploads/5/LogUsersOffNonUse97.zip  




-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Replies:
Posted By: Roger Carlson
Date Posted: 17 Mar 2020 at 7:35pm
Update: Access 2010-2019 accdb:  http://www.rogersaccesslibrary.com/forum/uploads/5/LogUsersOffNonUse_2010.zip" rel="nofollow - LogUsersOffNonUse_2010.zip

-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net