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
22 17236
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
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.
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' ?
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.
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.
This is what i have so far for sub routine action:
Sub IdleTimeDetected(ExpiredMinutes)
Dim Msg As String
strMsg = ""
strMsg = strMsg & "Application will CLOSE_"
strMsg = strMsg & "Click YES to continue working. Click NO to exit"
If MsgBox(strMsg, vbQuestion + vbYesNo, "No Activity detected") = vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Else
Application.Quit A_SAVE
delayTimer = 10000
Application.Quit A_SAVE
End If
MsgBox Msg, 48
End Sub
This is what i have so far for sub routine action:
Sub IdleTimeDetected(ExpiredMinutes)
Dim Msg As String
strMsg = ""
strMsg = strMsg & "Application will CLOSE_"
strMsg = strMsg & "Click YES to continue working. Click NO to exit"
If MsgBox(strMsg, vbQuestion + vbYesNo, "No Activity detected") = vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Else
Application.Quit A_SAVE
delayTimer = 10000
Application.Quit A_SAVE
End If
MsgBox Msg, 48
End Sub
Change this: -
Else
-
Application.Quit A_SAVE
-
delayTimer = 10000
-
Application.Quit A_SAVE
-
End If
To this: -
Else
-
Application.Quit acSaveYes
-
delayTimer = 10000
-
End If
-
You copied "Application.Quit A_SAVE" from Access 2.0 code. Access 2.0 is not Access 2000, rather it is the version that existed pre97.
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?
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. -
Else
-
idleTime = 0 'reset counters
-
delayTimer = 10000
-
Do Until idleTime = 10000
-
'Hang loose
-
idleTime = idleTime + ElapsedTime
-
If idleTime = 10000 Then
-
Exit Do
-
End If
-
Loop
-
delayTimer = 0
-
Application.Quit acSaveYes
-
End If
-
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?
It cannot be accomplished in any way with msgbox.
While msgbox is active no events will be triggered in any form.
You should create your own form with warning message, Yes No buttons and timer.
Good Luck.
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
Not sure where to place this code: (From MS' support page)
4. Create the following procedure in the form module: (How to access the FORM MODULE?)
Sub IdleTimeDetected (ExpiredMinutes)
Dim Msg As String
Msg = "No user activity detected in the last "
Msg = Msg & ExpiredMinutes & " minute(s)!"
MsgBox Msg, 48
End Sub
It cannot be accomplished in any way with msgbox.
While msgbox is active no events will be triggered in any form.
You should create your own form with warning message, Yes No buttons and timer.
Good Luck.
FishVal,
If I understood correctly NewtoAccess wants the system administrator to have the last say before shutdown.. NewtoAccess requested (see below) a "no" response to trigger the application exit 10 seconds after it is clicked, which is what the above code does.
<<<<<<So if VBYesNo no button selected within 10 seconds, then I want app to proceed with closing anyway.>>>>>>
NewtoAccess,
the Form module simply means the code behind a form (e.g. your idleTimeDected form) as opposed to a standard module or macro. You need to decide how you want the code to work before proceeding.
FishVal,
If I understood correctly NewtoAccess wants the system administrator to have the last say before shutdown.. NewtoAccess requested (see below) a "no" response to trigger the application exit 10 seconds after it is clicked, which is what the above code does.
<<<<<<So if VBYesNo no button selected within 10 seconds, then I want app to proceed with closing anyway.>>>>>>
I'm curious whether you've tested the code.
I've checked that while MsgBox is active no Timer event will be triggered, no code will run asynchronously.
No such a problem with special form. In this case there are two opportunities:
1) to handle timer event from this warning form
2) to handle timer event from the IdleUser detecting form (somewhat more sophisticated)
Good luck.
I'm curious whether you've tested the code.
I've checked that while MsgBox is active no Timer event will be triggered, no code will run asynchronously.
No such a problem with special form. In this case there are two opportunities:
1) to handle timer event from this warning form
2) to handle timer event from the IdleUser detecting form (somewhat more sophisticated)
Good luck.
FishVal,
I don't follow you. My suggested code runs only if the response to the message to the MsgBox is "No", so the MsgBox is no longer active at that point.
FishVal,
I don't follow you. My suggested code runs only if the response to the message to the MsgBox is "No", so the MsgBox is no longer active at that point.
Sorry. Maybe I've not got a point. Lets straight it.
The logic is:
1. to detect idle user situation
2. to warn the user about db closing
2.1. User confirms quit -> quit
2.2. User denies quit -> restart idle timer
2.3. User doesn't respond within a definite time period -> quit
Am I right?
If so, MsgBox will be helpless in p. 2.3.
Sorry. Maybe I've not got a point. Lets straight it.
The logic is:
1. to detect idle user situation
2. to warn the user about db closing
2.1. User confirms quit -> quit
2.2. User denies quit -> restart idle timer
2.3. User doesn't respond within a definite time period -> quit
Am I right?
If so, MsgBox will be helpless in p. 2.3.
FishVal,
OK, In writing my code, I understood NewToAccess to mean he wanted the ability to click the "no" button on the message box before actually following through with the shutdown of the application. If that is the case my code works, If that is not the case, and he wants the shutdown to occur without having to click the "no" button, then your scenario would be correct.
FishVal,
OK, In writing my code, I understood NewToAccess to mean he wanted the ability to click the "no" button on the message box before actually following through with the shutdown of the application. If that is the case my code works, If that is not the case, and he wants the shutdown to occur without having to click the "no" button, then your scenario would be correct.
An old shit. Who will guard the guards.
Who will do it for himself, if he does it for everybody who doesn't do it himself.
:)
PS. Custom form provides additional functionality, for example displaying final countdown.
NewtoAccess,
the Form module simply means the code behind a form (e.g. your idleTimeDected form) as opposed to a standard module or macro. You need to decide how you want the code to work before proceeding.
pretty much as descibed on the MS support site. After a set amount of idle time, I would like the user to automatically logged-off
pretty much as descibed on the MS support site. After a set amount of idle time, I would like the user to automatically logged-off
I followed the directions on the MS support page. I put this code in the ON FOCUS EVENT
Private Sub Form_GotFocus()
Sub IdleTimeDetected(ExpiredMinutes)
Dim Msg As String
Msg = "No user activity detected in the last "
Msg = Msg & ExpiredMinutes & " minute(s)!"
MsgBox Msg, 48
End Sub
Not sure what to expect......How does the detectidletime form get focus?? Is there a macro I must write so that the form is constantly running in the background?
I followed the directions on the MS support page. I put this code in the ON FOCUS EVENT
Private Sub Form_GotFocus()
Sub IdleTimeDetected(ExpiredMinutes)
Dim Msg As String
Msg = "No user activity detected in the last "
Msg = Msg & ExpiredMinutes & " minute(s)!"
MsgBox Msg, 48
End Sub
Not sure what to expect......How does the detectidletime form get focus?? Is there a macro I must write so that the form is constantly running in the background?
A picture is worth a thousand words. See the link below for a free download demo mdb with source code, entitled Detect & Logoff Idle Users. http://www.utterangel.com/pages/acce...nloads.aspx#18
Hi,
I referred to the link of the ms support website and it works fine.
But is it possible to detect inactivity when one form is on top of another?
What I mean is I have a main form - formList and when I click on a command button within the formList, another form - formDetails will open up.
In other words, the formList must be open before I can open the formDetails.
I want to auto log off at formList and formDetails.
I've put the code in both forms. But while I'll keying in details in the formDetails - the formList will be inactive.
Basically what I'm looking for is - if the formDetails is opened, it will check inactivity on that form & log off from the application.
But if only the formList is opened, it will check inactivity on the formList.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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....
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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....
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
|
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...
| |