[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Inactivity sensor and logout

Posted on 2001-08-29
7
Medium Priority
?
437 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…

612 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