Solved

Inactivity sensor and logout

Posted on 2001-08-29
7
423 Views
Last Modified: 2012-08-14
hi i am currently working on about 3 or 4 different databse systems some of which have been brought up for change to realign themselves to within the company's guidelines. i was wondering if it is possible ot have MS Access 97 sense if there is inactivity for 30 mins and then log you out of the system. i would be most grateful of any suggestions and help.

thanks

Chris
0
Comment
Question by:chrisbirley
7 Comments
 
LVL 8

Expert Comment

by:dovholuk
ID: 6435950
i tried this once and i found out that i don't know of a good way to do it in native access...

in access what you end up doing is hiding a form that has a timer event and a public global variable / hidden control. then everytime some action happens you reset the variable. the only pain is that you need to put mouse and key events EVERYWHERE...

i would assume that some library somewhere (or maybe an api call to whatever the screen saver uses) which does all this for you but i've never found it.

hopefully someone can help both us out! :)

dovholuk
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6436716
>then everytime some action happens you reset the
>variable. the only pain is that you need to put mouse and
>key events EVERYWHERE...


Is all that really necessary?  I would think that it would be sufficient to take note of the currently active form and currently active control ... no need to monitor mouse and keyboard activities.

If someone has not switched to a different control or to a different form within the 30 minutes (or whatever the timeout duration), then you can be pretty certain that they are being idle.

Just about all that's needed is the code in that Timer Event.


See KB Article Q128814 for an example.

   http://support.microsoft.com/support/kb/articles/Q128/8/14.asp


I use a very similiar technique, without having to put mouse and keyboard events everywhere, and it works very nicely.


-Dennis Borg
0
 
LVL 8

Expert Comment

by:dovholuk
ID: 6436754
it depends on how you structure your app... i have a lot of people who will use the "main" form exclusively. coming back to their workstation to add more info to the same screen.

compare this to word. if you open a document (consider each document as a "form") you could easily type. leave-comeback. type. leave-comeback. ad infinitum... (is that how you spell that??? lol) using the form by form method, you'll end up logging a person out who is still "actively" working.

again... just depends on how your app is structured.

cheers,

dovholuk
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 14

Expert Comment

by:mgrattan
ID: 6436969
Here's a link to a neat little sample database that demonstrates the hidden form with a timer.  It also includes a login form for better user tracking.

ftp://216.122.167.138/pub/candace/candace/logoff/logoff97.zip
0
 
LVL 8

Expert Comment

by:DennisBorg
ID: 6437524
>compare this to word. if you open a document (consider
>each document as a "form") you could easily type.
>leave-comeback. type. leave-comeback. ad infinitum... (is
>that how you spell that??? lol) using the form by form
>method, you'll end up logging a person out who is
>still "actively" working.


Yes, this is true. But given that this is a database application, it is not very likely that the main form would contain one and only one field. Most likely, that form would have a few or several fields.

Therefore, it would not be likely that the user would remain on the same form *AND* the same control for a very lengthy period of time and still be "actively working".

Which is why my suggestion included that you look at the current Control *and* the current form. If either has changed, then that denotes activity.

However, if the user has remained on the control on the same form for a long period of time, then it is very likely that the user is idle.

But like you said, that depends upon the structure of the application.

But even so, even if you did have a one-control form, you could still have your timer code also consider the current value of the current control to see if it has changed. If the only control on the only form of the application has not had its value changed, then that would definitely indicate that the user is idle.

But if your application was only one control on one form, we could make it even more simple. Because you wouldn't need the hidden form at all. All you'd need is to use the timer event on that main form, and a couple or a few events, such as AfterUpdate or Change. So it still would be very simple and not require mouse and keyboard events all over the place.

-Dennis Borg
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6989669
for chrisbirley

It's time to clean up this TA, so I will leave a recommendation in Community Support that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7003431
Per recommendation, points refunded and question closed by
Netminder
CS Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now