Solved

Inactivity sensor and logout

Posted on 2001-08-29
7
430 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

630 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