Results 1 to 11 of 11
  1. #1
    KathyL is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    94

    How to force all users out of the database?

    I have a multi-user database. There are times when some users walk away or go to lunch for hours. I want the last user out such that the database can be closed and compacted. As long as the .ldb file is open because of one or more ‘absent’ users, it can’t be closed and compacted by myself.


    How can you force a disconnect of all users or close the database from within the Access database? (I know users can be disconnected by a server administrator, but administrators are rarely available.)


    Thank you in advance for help you can give me!

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    Well there is nothing embedded in the product itself. And in my humble opinion is a feature that would/should be added by Microsoft.

    Generically speaking to build this, one would put a table in the BE with just 1 record, 1 field - and then in the FE embed a field check method at a point that will occur with some regularity; which in turn triggers a close - perhaps preceeded by a pop up. But of course people can open their FE - and then go to a meeting and so nothing is going to trigger unless you rely on timers. And there is timer capability in the forms - so then you have to then set this up too.

    One thing leads to another, and whether this is within your skill set or not can be an issue; particularly compared to a mass email or phone call asking everyone to get out; which of course is imperfect too. Which ends up at the point where most IT professionals work - which is to implement changes in an off hour.

    Here is one canned solution put together by a power user:
    http://www.rogersaccesslibrary.com/f..._topic151.html

    hope this helps.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Here's an additional list of "Kick 'em off" type routines to pick from.

  4. #4
    KathyL is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    94
    Quote Originally Posted by RuralGuy View Post
    Here's an additional list of "Kick 'em off" type routines to pick from.
    I don't see a list. ???

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  6. #6
    KathyL is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    94
    Quote Originally Posted by NTC View Post
    Well there is nothing embedded in the product itself. And in my humble opinion is a feature that would/should be added by Microsoft.

    One thing leads to another, and whether this is within your skill set or not can be an issue; particularly compared to a mass email or phone call asking everyone to get out; which of course is imperfect too. Which ends up at the point where most IT professionals work - which is to implement changes in an off hour.

    Here is one canned solution put together by a power user:
    http://www.rogersaccesslibrary.com/f..._topic151.html

    hope this helps.
    Kind of hard to do changes in an off hour when the company works 24 hour days.

    I looked at the code behind that canned solution. I don't see an actual force to close the database. It appears messages are sent to the user to ask for a voluntary quit, and then when all are out, the administrator can close.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I use a table that has a field I watch every 10 seconds from every FrontEnd. When the value is non zero, that defines the seconds until each FrontEnd closes and puts up a warning message so users can close out if they choose. Either way the FrontEnd *will* close.

  8. #8
    KathyL is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    94
    I think I've got an idea. It came from some suggestions to set a timer on users to check for idle time, with a timer in the background. I can work with that and also have that background program (which will run on each client) check for a flag in an administrator table, if the flag is turned on, do an immediate quit.

    I'm going to try that. Thanks to everyone for the feedback.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I use the AutoExec macro to load an invisible form when the db loads. It is this form that I do almost all of my housekeeping including checking for "KickEmOff" flags. It is also the last form to unload so I use it to do any cleanup I might need. It is always loaded and I find it very useful.

  10. #10
    KathyL is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    94
    Success!

    After viewing many sites and going through that whole list you gave me RuralGuy, I chose the code from this site:

    http://www.databasejournal.com/featu...aintenance.htm

    There was an easy download of a DB, it had one table and three forms to bring into my database, and one line of code to initiate the open of a form in hidden mode... and it was off and ready to work.

    Thanks for all the tips and links!

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's great Kathy! Are you ready to follow the link in my sig and mark this thread as Solved?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Multi users and Split Database
    By cohrsman in forum Access
    Replies: 4
    Last Post: 08-01-2013, 09:13 AM
  2. Force users to log off
    By Bruce in forum Security
    Replies: 8
    Last Post: 01-10-2013, 07:03 PM
  3. Logfile of what users do in database
    By philipd in forum Security
    Replies: 6
    Last Post: 11-17-2009, 04:10 PM
  4. sharing database over several users issue
    By marianne in forum Access
    Replies: 8
    Last Post: 06-02-2009, 07:20 PM
  5. Users on Database Simultaneously
    By rtemple in forum Access
    Replies: 2
    Last Post: 03-26-2009, 08:38 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums