Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 434
  • Last Modified:

Inactivity sensor and logout

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
chrisbirley
Asked:
chrisbirley
1 Solution
 
dovholukCommented:
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
 
DennisBorgCommented:
>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
 
dovholukCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
mgrattanCommented:
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
 
DennisBorgCommented:
>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
 
nico5038Commented:
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
 
NetminderCommented:
Per recommendation, points refunded and question closed by
Netminder
CS Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now