473,549 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatically Log off idle users

32 New Member
Hi,
We have a shared Access 2000 database shared among many users within the company I work for.

many times, users open up the shared database and forget to close it.
So I cant even make modifications to it after work hours since users are logged in.

Is there a way to log off users after a long period of inactivity?

Let me know, thanks
Jun 8 '07 #1
22 17265
puppydogbuddy
1,923 Recognized Expert Top Contributor
Hi,
We have a shared Access 2000 database shared among many users within the company I work for.

many times, users open up the shared database and forget to close it.
So I cant even make modifications to it after work hours since users are logged in.

Is there a way to log off users after a long period of inactivity?

Let me know, thanks
Yes, but there is debate on the best way to accomplish it. Here is a link to Microsoft's way:

ACC: How to Detect User Idle Time or Inactivity
http://support.microsoft.com/?id=128814
Jun 8 '07 #2
Rabbit
12,516 Recognized Expert Moderator MVP
Hi,
We have a shared Access 2000 database shared among many users within the company I work for.

many times, users open up the shared database and forget to close it.
So I cant even make modifications to it after work hours since users are logged in.

Is there a way to log off users after a long period of inactivity?

Let me know, thanks
Is there a form that will always be open? Use a global variable and public functions with the Timer, Mouse Move, and Key Press events on every form to track how long a person has been idle.
Jun 8 '07 #3
NewtoAccess
32 New Member
I'll check out the website.
I do have a Mainform that links to other forms. Mainform always remains open even if other forms are being worked on.

I think I should put a timer on the MAINFORM. And then have countdown which alerts the user and gives them the option to reset timer or not.

How could I code this? And where on form should it be added? 'on current' ?
Jun 8 '07 #4
Rabbit
12,516 Recognized Expert Moderator MVP
I'll check out the website.
I do have a Mainform that links to other forms. Mainform always remains open even if other forms are being worked on.

I think I should put a timer on the MAINFORM. And then have countdown which alerts the user and gives them the option to reset timer or not.

How could I code this? And where on form should it be added? 'on current' ?
The link provides you with everything you need to implement one way of checking to see if someone's idle.Let us know if you have any touble.
Jun 8 '07 #5
NewtoAccess
32 New Member
Thanks for the link. I added the forms as mentioned on the microsoft site, only problem is an option whether or not to continue working did not appear.
It just closed right away.

I want to give the user a warning before closing by checking yes/no. if nothing is selected then it should proceed with quiting app.
Jun 11 '07 #6
NewtoAccess
32 New Member
This is what i have so far for sub routine action:

Sub IdleTimeDetecte d(ExpiredMinute s)
Dim Msg As String
strMsg = ""
strMsg = strMsg & "Applicatio n will CLOSE_"
strMsg = strMsg & "Click YES to continue working. Click NO to exit"
If MsgBox(strMsg, vbQuestion + vbYesNo, "No Activity detected") = vbYes Then
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, 5, , acMenuVer70
Else
Application.Qui t A_SAVE
delayTimer = 10000
Application.Qui t A_SAVE
End If

MsgBox Msg, 48
End Sub
Jun 11 '07 #7
puppydogbuddy
1,923 Recognized Expert Top Contributor
This is what i have so far for sub routine action:

Sub IdleTimeDetecte d(ExpiredMinute s)
Dim Msg As String
strMsg = ""
strMsg = strMsg & "Applicatio n will CLOSE_"
strMsg = strMsg & "Click YES to continue working. Click NO to exit"
If MsgBox(strMsg, vbQuestion + vbYesNo, "No Activity detected") = vbYes Then
DoCmd.DoMenuIte m acFormBar, acRecordsMenu, 5, , acMenuVer70
Else
Application.Qui t A_SAVE
delayTimer = 10000
Application.Qui t A_SAVE
End If

MsgBox Msg, 48
End Sub

Change this:
Expand|Select|Wrap|Line Numbers
  1.            Else
  2.                Application.Quit A_SAVE
  3.         delayTimer = 10000
  4.         Application.Quit A_SAVE
  5.             End If
To this:
Expand|Select|Wrap|Line Numbers
  1.            Else
  2.       Application.Quit acSaveYes
  3.        delayTimer = 10000
  4.        End If
  5.  
You copied "Application.Qu it A_SAVE" from Access 2.0 code. Access 2.0 is not Access 2000, rather it is the version that existed pre97.
Jun 11 '07 #8
NewtoAccess
32 New Member
OK. I'll update the commands.
Still though, I want application to autoclose.

So if VBYesNo no button selected within 10 seconds, then I want app to proceed with closing anyway.

How can this be accomplished?
Jun 11 '07 #9
puppydogbuddy
1,923 Recognized Expert Top Contributor
OK. I'll update the commands.
Still though, I want application to autoclose.

So if VBYesNo no button selected within 10 seconds, then I want app to proceed with closing anyway.

How can this be accomplished?
You did not post all of your code, so you may need to replace object names in the code below with the appropriate object names from your code.
Expand|Select|Wrap|Line Numbers
  1. Else
  2.        idleTime = 0                          'reset counters 
  3.        delayTimer = 10000
  4.        Do Until idleTime = 10000
  5.              'Hang loose
  6.              idleTime = idleTime + ElapsedTime
  7.              If idleTime = 10000 Then
  8.                 Exit Do
  9.              End If
  10.        Loop
  11.        delayTimer = 0
  12.        Application.Quit acSaveYes
  13. End If       
  14.  
Jun 11 '07 #10

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

Similar topics

0
2532
by: ACI | last post by:
Auto Close Idle helps you utilize your multi-user concurrent users licenses more efficiently. It closes unattended clients remotely after a certain period of time or manually. Furthermore, clients can close the most idle user automatically without the need for the administrator's intervention. For more information visit our web site... ...
3
1549
by: Dave | last post by:
I am moving a web to a new address. The old address will be shut down in several weeks. Is there a way to automatically redirect users who come to the old site in these last few weeks to the appropriate page on the new site?
3
4396
by: Jim G | last post by:
Hi, We have a limited number of licenses to some software we have installed on our users desktops. The problem is that sometimes the users open up the application and then don't use it all day. This prevents others from being able to use the application because we run out of licenses. I'm thinking that we want to create a windows...
9
1763
by: jab3 | last post by:
So I'm considering a small project that involves online file storage. Let's say I wanted to set up a site that allows people to log-on, create an account, and then have space to upload files. The problem I'm having concerns permissions, basically. 1) How do I automatically create users in Linux from a PHP script running under Apache's...
4
3566
by: Debscanadian | last post by:
Access 2003 I have successfully created a hidden form as described in the KB article for logging out idle users. Now I am faced with the problem that if the open form(s)/subforms are dirty, I want the new data discarded. I am really stuck on how to attack this one. I have been able to reference the activescreen.form, but the...
2
1405
by: gomzi | last post by:
Hi, I would like to know as to how I could accomplish the task of automatically updating my users gridview when I insert a new row in my database. i.e. Suppose I insert a new row in a database, then all the user's griview should display that new row without them having to refresh their page. i.e. Something like gmail or microsoft's outlook. ...
4
1529
by: Snoopy33 | last post by:
I have just sat up a database that has 2 - 10 users at any given time. Everything is running smooth, however when someone's computer goes into standby it seems to lock everyone else out of the database and prevent changes from being made. I have a module that detects existing users and I have sat it up so that I can kick individual users...
5
2568
by: camilin87 | last post by:
hello. I'm building a site using php I have a setup.php page wich has at the begining session_start(); and every single page from my site includes setup.php. When a user registers I save in $_SESSION the userName, so that when ! isset($_SESSION) I can redirect him to the login.php page. After some inactivityperiod, e.g. 20 min, I need that...
3
1511
by: Sharkiness | last post by:
Good Afternoon, I would like some help on creating some code on my forms Load function so that when a user opens it they will automatically have only their allocated records available for viewing. A bit of Background; I have a table that lists a number of companies and the contact details for these companies. Each company has someone...
0
7546
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7471
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6071
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5387
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5111
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3496
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
784
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.