Solved

Inactivity sensor and logout

Posted on 2001-08-29
7
422 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
Comment Utility
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
Comment Utility
>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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 14

Expert Comment

by:mgrattan
Comment Utility
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
Comment Utility
>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
Comment Utility
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
Comment Utility
Per recommendation, points refunded and question closed by
Netminder
CS Moderator
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
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…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

10 Experts available now in Live!

Get 1:1 Help Now