Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Log everyone out of Access Database


Message #1 by "Derek Stewart" <derekstewart@y...> on Fri, 14 Mar 2003 14:05:17
I have an access database used by about 25 people.  It often becomes 
corrupted and needs to be repaired.  The problem is tracking down the 25 
users to make sure they have exited so as repair can be made.  Is there a 
way to log all users off a particular database so I can run the repair?  
Thanks.  Derek
Message #2 by Lonnie Johnson <prodevmg@y...> on Fri, 14 Mar 2003 06:11:16 -0800 (PST)
This is what I did:
1. Create a table in another database called tblShutdown. For now let it have one column called App1. Make it a boolean (yes/no).
Link this table to your application that you want to shut down.
2. Create a form in the database application and call it frmShutdown. It's recordsource will be the table above. It will have one
text box with a control source = App1.
3. In the forms Option Explicit Statement dim a variable as an integer for a counter.
4. In the form's on timer event set vba code to check the value of App1 every so often. I check mine every two minutes. If the value
becomes True then issue a message to the user that the app is going down in two minutes or so. Also if it is true we set the timer
interval to sixty seconds instead of two minutes. I start added 1 to my counter and when the counter = 3, I shut down the
application thru the code.
5. I also have code in the onload that checks to see if the value of this text box is true. I do this in case anyone tries to log on
while I have it shut down. If it is true here, I issue a message box saying that the dB is under repair. Check back in a few minutes
and then Shut the dB back down thru code.
6. Now that you have all this in place, all you need to do is create a form for you in the database that has the tblShutdown in it
so that you can set the value false when you want to kick em out and true when you wanna let em back in.
Hope this is clear. It dosen't have the fine details, just the concept. Let me know if you need more clarification.
 
 
 
 Derek Stewart <derekstewart@y...> wrote:I have an access database used by about 25 people. It often becomes 
corrupted and needs to be repaired. The problem is tracking down the 25 
users to make sure they have exited so as repair can be made. Is there a 
way to log all users off a particular database so I can run the repair? 
Thanks. Derek


Lonnie Johnson
ProDev, Professional Development of MS Access Databases
http://www.prodev.us
Let me build your next MS Access database application. 




 



---------------------------------
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
Message #3 by "Derrick Flores" <derrickflores@s...> on Sat, 15 Mar 2003 19:21:43 -0600
Derek, 
Go to FMS Inc. website and download the demo to Total Access Admin.
http://www.fmsinc.com/Products/Admin/index.asp
This demo will list all the users that are currently log into the
database.  Also, you can send messages to them from within the database
letting know that you will need to do some maintenance.  But wait
there's more!  You can also, automatically close them out and or prevent
them from opening the database.
This is a great tool to use.
 
Good luck,
Derrick Flores
San Antonio, Texas
 
-----Original Message-----
From: Derek Stewart [mailto:derekstewart@y...] 
Sent: Friday, March 14, 2003 2:05 PM
To: Access
Subject: [access] Log everyone out of Access Database
 
I have an access database used by about 25 people.  It often becomes 
corrupted and needs to be repaired.  The problem is tracking down the 25

users to make sure they have exited so as repair can be made.  Is there
a 
way to log all users off a particular database so I can run the repair?

Thanks.  Derek


  Return to Index