Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    May 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disconnect Access Users (Access 2000)

    At work we have an Access database that is set up to open and compact several other databases during the night. We run this utility every night to help keep all of our databases on the server running and compacted. If a database is open our compactor database can not get an exclusive lock and wont compact the database in question. My question is how can I disconnect or close a database from within a second database thus allowing me to compact it remotely?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Disconnect Access Users (Access 2000)

    I don't believe you can. The best you can do is to put in procedures in a database to automatically disconnect users. I've never done this myself, but have seen other discussions. Usually it involves a hidden form with a timer event set. In some cases, the timer event can just look at the time of day, and after a certain time first warn the user then at a specified time just quit the application. This works when someone leaves the application up when leaving the office for the night. Another, but more tricky approach, is to check for keystroke activity. After a certain period of inactivity, the application quits (or perhaps first closing any open form returning user to a menu, then quitting after another specified time has elapsed).
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    New Lounger
    Join Date
    May 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disconnect Access Users (Access 2000)

    We have this running in most of the applications already. Some of the users complained though because they use the program off and on through out the day and got tired of being kicked out and having to log back in again.

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Disconnect Access Users (Access 2000)

    I guess it comes down to the purpose for kicking them out of the database during the day. Some places, because of security, don't want the database up on an unattended terminal. Another situation is to avoid conflicts when someone starts to edit a record but doesn't save it. I think the most common, however, is just to make sure that everyone is out of the database at night so it can be backed-up.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    New Lounger
    Join Date
    May 2003
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disconnect Access Users (Access 2000)

    We have created some code and put it in the timer event of the main form. If the program is left running over night (we have users that do this even though they are not supposed to) it checks against the system clock. If the clock hits a certain time say 4:00 am and the program is open it will automatically close the program. This will work for the time being and we will modify it as we need to if the program really needs to be open at that time of the morning.

    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •