Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2005, 12:54 PM
Registered User
 
Join Date: May 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access 2000 "Time Out Users"

I need a way to automatically log out users who have been idle in the database for more than 30 minutes. I do not use the access security setup or user/group accounts/permissions. I have my users log into a form which keeps track of who logs in and out and at what time. I do have the database set up to read the ldb file to make sure no more than 6 users can log into the database at one time.

Does anyone have any idea how to kick users out of the database after a certain amount of time?


 
Old July 18th, 2005, 04:20 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Have a hidden form triggered from your login form, have a timer on the hidden form set to 30 minutes and get it to restart the timer whenever you do something, or not (up to you!)... after your 30 minutes, have the hidden form close... in the close event of the hidden form, put in a quit application command. (You have gotta be quite careful about how you check for the close event as you may change the focus during data entry.)

Note:
It is also an opportunity for you to put in an override to the timer too, so you could kick people out of the db if you wanted to. Personally, Id put the "trigger" field on the hidden form as something like a checkbox (you might even wanna have it bound to a single field, single record table?), and have the checkbox set by your timer... it would mean you could go in, set the checkbox to true/false/whatever and effectively lock the db, say whilst making a change or doing some admin.
 
Old July 19th, 2005, 11:12 AM
Registered User
 
Join Date: Apr 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Kevinsharrison
Default

Lee,

Could you go into more detail on how to make this happen. I would like to make something like this too. How do you make the "trigger" that you are talking about. How do you specify what user it is. I dont' know that code right now to say what user it is. Like I was wanting to know what user made a change to some data also. How do you know what user/computer did it?

 
Old July 19th, 2005, 11:22 AM
Registered User
 
Join Date: May 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found this link online and it works great. Put the first block of code in you form timer event and the second block of code in a module. I honestly didn't even use the second block of code. Instead, I just closed the application docmd.quit instead of calling the sub in the module.

The link is:
http://support.microsoft.com/?id=128...23120121120120

I am currently working on opening a word document, which displays a "You were logged out from the database" message. I will post the code if I can figure out how to do this.

Another cool access link is:
http://home.bendbroadband.com/conrad...essjunkie.html

And:
http://www.accessmvp.com/djsteele/AccessIndex.html







Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set up system time for SQL 2000 rainman12 SQL Server 2000 1 October 31st, 2005 09:09 AM
SQL 2000 Maximum Users reyboy SQL Server 2000 1 June 27th, 2004 09:34 PM
SQL SERVER 2000 AND ACCESS 2000 ckentebe SQL Server 2000 3 June 17th, 2004 08:50 PM
ADE file in Access 2000 <---> Access XP ginoitalo Access 3 April 14th, 2004 09:06 PM
Logging users in access. sampow Access 6 December 16th, 2003 07:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.