473,385 Members | 1,693 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.

Does Access provide a time-out capability?

sueb
379 256MB
I make front ends for each of my users (some of them read-only; others displaying only a subset of the data), but many of my users are pretty unsophisticated. This results in their leaving their computers on when they leave work for the day and, consequently, leaving their database open. That, of course, prevents me from working on the database's back end.

I'd prefer it if I could insert a timer that closes the front end after 15 minutes of inactivity. Failing that, does anyone know of a way to remotely kill a front end?
Oct 25 '10 #1

✓ answered by colintis

Here's an idle time example from M$
http://support.microsoft.com/?id=128814

14 12889
ADezii
8,834 Expert 8TB
To the best of my knowledge, there is no built-in functionality within Access that monitors inactivity. You may be able to accomplish this by the API, but I'm not exactly sure how to go about this.
Oct 25 '10 #2
NeoPa
32,556 Expert Mod 16PB
As long as any form is still open the timer facility can be made available to run code after a certain period of inactivity. Inactivity would have to be defined in the code though, as I don't believe Access provides anything built-in. It would mean every action within the project would have to log activity when it executed, thereby resetting any timer. Quite complicated, and prone to error unless you make sure that every possible form of detectable activity is logged.
Oct 25 '10 #3
sueb
379 256MB
Okay, then, is there a way for me to remotely kill a front end? I know that after a certain time in the evening everyone is actually off.
Oct 26 '10 #4
colintis
255 100+
Here's an idle time example from M$
http://support.microsoft.com/?id=128814
Oct 26 '10 #5
ADezii
8,834 Expert 8TB
The following Code comes with no Implied Warranty whatsoever, theoretically it should work.
  1. Set the Form's Timer Interval to 900000 (15 minutes), or whatever Value you like.
  2. Place the following Code in your Form's Timer() Event, I'm assuming your Form's Name is Form1.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Form_Timer()
    2.   If Time > #11:00:00 PM# Then
    3.     DoCmd.Close acForm, "Form1", acSaveNo
    4.       DoCmd.Quit
    5.   End If
    6. End Sub
  3. Every 15 Minutes, the Timer() Event will fire and see if the Current Time is after 11:00 PM (Date is irrelevant, Time can be changed).
  4. If it is after 11:00 PM, and as long as the Database is active, and Form1 is open, the code will then:
    1. Close Form1, disregarding the Save to avoid any Prompt.
    2. Quit Access.
  5. This Procedure must be duplicated on each and every Front End.
  6. Good Luck, and let me know how it works out.
Oct 26 '10 #6
Mariostg
332 100+
I actually have an application that uses Colintis link. It works fine.
In another application, I also have a system table that contains two fields, param and value. One of the entry has param "IsBlocked" and the value can be either no or yes, which I can change at will. If I set it to yes, people will be kicked out of the application as soon as they perform selected operations like scrolling data or changing certain fields. If set to yes, it will also prevent people from starting the application.
Oct 26 '10 #7
sueb
379 256MB
These are great suggestions. Thanks, all! I think I'm going to first try the idle time code as published on Microsoft's website; it seems the most flexible.

I'll post back to this thread once I've figured out which approach worked best for me.
Oct 26 '10 #8
NeoPa
32,556 Expert Mod 16PB
I don't believe there is an Access way to kill a front-end. I expect there are ways to kill processes remotely if you have the process ID, as there are tools out there that do that, but I'm afraid I have no idea how that would be implemented programatically.

ADezii's approach of checking the time of day, may prove more productive for you considering what you've told us. In such a case, the period between checks is not limited to 15 minutes of course. Every minute would be just as appropriate (possibly more so).
Oct 26 '10 #9
NeoPa
32,556 Expert Mod 16PB
On first reading that I felt the concept was a little clumsy, but looking at it again, it's hard to see what type of database activity could go on if the current form and control remained the same at every check (each second) for a duration of 15 minutes.

That's quite a neat solution. Possibly not 100%, but pretty darn close. You'd probably need to ensure users only ever accessed the database via the programmed interface, but many like to ensure that anyway, so not much of a cost.
Oct 26 '10 #10
ADezii
8,834 Expert 8TB
I actually downloaded the Microsoft Demo and found it to very interesting and related to this Thread. I made some slight changes of my own, prettied it up a little, and created my own Demo which I hope will clearly demonstrate the technique of closing Front End DBs after a certain period of inactivity, solely within Access. Download the Attachment and see what you think.
Attached Files
File Type: zip DetectIdleTime.zip (28.5 KB, 786 views)
Oct 26 '10 #11
sueb
379 256MB
Wow, thanks, ADezii! My work schedule this week probably means that I won't be able to actually try this out until at least the weekend, but you can be sure that I'll report back as quickly as possible.

Thanks again!
Oct 26 '10 #12
ADezii
8,834 Expert 8TB
You are quite welcome, sueb.
Oct 26 '10 #13
sueb
379 256MB
Okay, this is yet another triumph! The combination of the MS stuff in the link posted by colintis and ADezii's timer are perfect--I inserted ADezii's timer bracket around the whole thing.

So how do I choose two "best" answers? Because, really, the time-of-day thing is particularly important...
Dec 28 '10 #14
ADezii
8,834 Expert 8TB
colintis was the first to propose a workable solution, I do believe that you should select his as the Best Answer.
Dec 28 '10 #15

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

Similar topics

1
by: news.terra.es | last post by:
Hi all, I cannot manage an Access short time date format from python ODBC. How could I do? Here it is an example of what I do. >>> import odbc >>> cnn = odbc.odbc("DATETEST") >>> cur =...
3
by: Peter Moscatt | last post by:
Does Tkinter provide a combobox or do I have to find some way of making a listbox do the job ? Pete
1
by: Sebastian C. | last post by:
Hello everyone I just found at the adress below Microsoft Access Run Time. It says that this is Access Run Time :Alternative Version. There is nothing about who can download or install this...
1
by: Jacquo Johnson | last post by:
I am receiving the following error: MS Access Date/Time DBD::ODBC::st execute failed: , , " . "FROM WHERE > '2004/02/01 11:16:16'"; $sth = $dbh->prepare($sqlstatement); $sth->execute ||...
7
by: tombsy | last post by:
Please can you tell me what version of DAO does access 2002/2003 use ? Access 97/2000 can use DAO3.5 and DAO3.6 Can I compact a 2002/2003 db using DAO 3.6? thanks in advance regs Tombsy
2
by: cyshao | last post by:
When we copy files in MyComputer, there is a dialog with a ProcessBar and a Cancel button. Does C# provide something like this dialog? Thanks CYShao
1
by: nd02tsk | last post by:
Hello Does PostgreSQL provide anything comparable with the functionality of MySQL Cluster? I appreciate all information. Thank you. Tim
2
by: ReshmaPC | last post by:
Hello all, How to access real time data that is in remote server to local data base.. Regards Reshma
3
by: Paul H | last post by:
Most of my projects are developed in Access 2003. I have not even installed Office 2007 yet! I need to buy VSTO to get the run-time licence for Access 2003. No doubt I will soon need a run-time...
3
by: muddasirmunir | last post by:
well i want to know how to install microsoft access run time component in user machine so the user did not have to buy microsoft access. actullay, i want to know that while insatalling our...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.