473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with Inactivity Detection

twinnyfo
3,653 Expert Mod 2GB
Re : Inactivity Detection in Access.

NeoPa,

I just encountered a very strange occurrence with this code (using Access 2010).

First off, this code works. Thanks much for the work you've done.

However, I have experienced a very strange situation when I run this code on one form, but not the other. I will give an example: I open my DB, which opens the Switchboard Form, which has this function in the timer. I use 30 minutes as the time to kill the DB if the user has not touched the db. After 30 minutees, the DB dies, as expected.

When I navigate to another form (which also closes the switchboard), which does not have this code in the Timer Event, and I use this form for a long time (i.e. "not idle"), and then close that form (which opens the Switchboard again), the switchboard will appear for a split second and then the DB will quit on me.

When I used the system idleness (see Post #2), I had no problems, but when I transitioned to an Access-specific idleness, this was the result.

Any ideas why this would be happening?
Jun 25 '14 #1

✓ answered by NeoPa

The code, or more correctly the whole process, depends on being run regularly. If you stop running it, but then start it again to continue from where it left off before - which is essentially exactly what you're doing, then it will see :
  1. The situation is the same as last time it checked.
  2. The time since it last logged a change in status was over 30 minutes.
That's all it needs to determine that the system's been idle for that long.

Going back to my first sentence, the way to ensure that this process is run continuously is to have a form that it's connected to (In whose Timer procedure it runs.) which never stops being open during the life of the session. To handle this it is simply necessary that when it's not required on the screen it gets hidden rather than closed. Other references to starting it then get changed to unhiding it instead. Having it close and then re-open is not an option that will work very well for you.

3 1703
NeoPa
32,556 Expert Mod 16PB
The code, or more correctly the whole process, depends on being run regularly. If you stop running it, but then start it again to continue from where it left off before - which is essentially exactly what you're doing, then it will see :
  1. The situation is the same as last time it checked.
  2. The time since it last logged a change in status was over 30 minutes.
That's all it needs to determine that the system's been idle for that long.

Going back to my first sentence, the way to ensure that this process is run continuously is to have a form that it's connected to (In whose Timer procedure it runs.) which never stops being open during the life of the session. To handle this it is simply necessary that when it's not required on the screen it gets hidden rather than closed. Other references to starting it then get changed to unhiding it instead. Having it close and then re-open is not an option that will work very well for you.
Jun 26 '14 #2
twinnyfo
3,653 Expert Mod 2GB
NeoPa,

Very good explanation. It helps me understand the results. Very easy to add a hidden form that nobody ever sees.

Thanks for the quick response!
Jun 26 '14 #3
NeoPa
32,556 Expert Mod 16PB
Very pleased to hear that Twinny.

The timing is more random than anything else, but always (extra) happy to help a site Expert :-)

Status update on its way. Only bureaucracy holding up the process (IE. No-one around who can do it for now :-D).
Jun 26 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

60
by: Fotios | last post by:
Hi guys, I have put together a flexible client-side user agent detector (written in js). I thought that some of you may find it useful. Code is here: http://fotios.cc/software/ua_detect.htm ...
6
by: Gustav Medler | last post by:
Hello, there is a known problem with Opera and the execution of content shown in <NOSCRIPT> tag. Everythings works fine, if there is only one simple script like:...
8
by: R. Smits | last post by:
I've have got this script, the only thing I want to be changed is the first part. It has to detect IE version 6 instead of just "Microsoft Internet Explorer". Can somebody help me out? I tried...
1
by: Rohit Raghuwanshi | last post by:
Hello all, we are running a delphi application with DB2 V8.01 which is causing deadlocks when rows are being inserted into a table. Attaching the Event Monitor Log (DEADLOCKS WITH DETAILS) here....
4
by: Dominique Vandensteen | last post by:
I need to receive an event when a form has a certain time of inactivity. Deactivate and Activated events are not good enough. With these events I can't find out inactivity if the form is simply...
4
by: sconeek | last post by:
hi all, i am trying to implement a page re-direction after a certain amount of inactivity. can somebody please help me in this. i was thinking could i display a screensaver using JavaScript after...
26
by: Tom Becker | last post by:
Is there a way, from Access, to programmatically click the Send and Receive button in Outlook?
0
by: darrenhello | last post by:
hi there, I am doing my last year's project and I have a 'little' problem. I have to do an edge detection filter. for now, some normal edge detection filters that I used worked fine but there a...
10
by: Conrad Lender | last post by:
In a recent thread in this group, I said that in some cases object detection and feature tests weren't sufficient in the development of cross-browser applications, and that there were situations...
4
NeoPa
by: NeoPa | last post by:
Introduction Many developers within Access need to be able to detect when the user has been inactive for a while. It's quite common to have a requirement to run something if/when the system's not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.