Results 1 to 7 of 7
  1. #1
    Join Date
    May 2004
    Posts
    11

    Unanswered: Kick users out of my database

    Is there a way to eject or disconnect the current users of an Access 2000 database?

    There are times when we need to do work on the database and a user ignores the messages to get out, or a user leaves for the day and stays logged in to the database...

    I have found the MS Knowledge Base article that allows me to *see* who is in the database, but I can't find a way to remove them.

    Also, if there is a way, are there any issues I ned to be aware of when doing it?

    Thanks,

    Anthony Kroes
    Green Bay, WI
    Last edited by akroes; 11-16-04 at 13:01.

  2. #2
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    from another site...


    By the way, a simple way to kick out a user would be to have a form (hidden or a switchboard) that is always open. Every 30 seconds (using the Form's timer) check to see if a value in a table (such as a Settings table with the fields 'settingname' and 'value', and make one record with settingname = 'kickoutusers') is set to kick them out. if so, then have it boot them.

    tblSettings
    settingname | value
    --------------------------
    KickOutUsers | 0

    When the value is 0 (meaning false) it will not boot them. all other numbers will boot them.


    then use this code (cmd1 is a command button that you can use to turn off the boot process so you can work on the database, which would have to be pressed within 30 seconds if that is what the timer interval is set to):

    Dim shouldboot As Boolean
    Private Sub Form_Timer()
    If shouldboot = True Then
    If DLookup("value","tblSettings","[settingname]='KickOutUsers'")<>0 Then
    MsgBox "you have been booted from the database by the administrator."
    Application.Quit
    End If
    End If
    End Sub

    Private Sub Form_Open(Cancel As Integer)
    shouldboot = True
    If DLookup("value","tblSettings","[settingname]='KickOutUsers'")<>0 Then
    MsgBox "the database cannot be opened because the administrator has closed it and booted everyone."
    Application.Quit
    End If
    End Sub

    Private Sub cmd1_Click()
    If InputBox("Please enter password to prevent booting sequence") = "thepassword" Then
    shouldboot = False
    MsgBox "boot sequence halted"
    Else
    MsgBox "incorrect password"
    End If
    End Sub

  3. #3
    Join Date
    Oct 2004
    Posts
    5
    But what if they are using for an undetermined amt of time?

  4. #4
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    The way i use it is when i need to update the data in the backed of the db i change the tblsettings.value to 1 then the user will see a message box and the database will close after a period of time. When i'm finished updating i change tblsettings.value back to 0.

    tblSettings
    settingname | value
    --------------------------
    KickOutUsers | 0



    (sorry it took so long to reply)

  5. #5
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    Hi guys,

    2 questions regarding the above.

    How do you tell who is in your database

    and

    How do you send them a message

    Currently I have to phone everyone up to check if they are in and if so to close it

  6. #6
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    if you want all the users to exit the database the code above will do it.

    your db has to be split for it to work.

    check this link for a list of users in your db
    http://support.microsoft.com/?id=198755

  7. #7
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Here is a site that carries just what you want. They offer a full suite of stuff to do all your adminstration needs. Not free but it has what it takes to get the job done.

    www.fmsinc.com


    have a nice one,
    BUD

Posting Permissions

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