Results 1 to 5 of 5
  1. #1
    IIBRAHIM is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    7

    How to Logout all Users

    Hello,



    Please I want to create a button where I can click and automatically log-out all the users in the MS Access application or database.

    So when there is an active user, i can click and log-out the user.

    Kind Regards.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Basically you need to run a timer on a form that stays open all the time (usually you opening form or you create a new one and have it hidden). Then you need a way to flag the shut-down initiation, I use a custom system table (just prefix it with usys like usysShutDown) with a Yes\No field that I turn on and off. In the timer event you check for the value of the flag and if yes you close the db (I use a timed message box to tell users that the db is about to close). The final piece is to add code to the AutoExec macro or Open event of the opening form to check the value of the flag and quit if set to Yes (to prevent new users to open it while you work on it).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    i have a form fHidden, that opens hidden, all properties hidden, with timer every 20 seconds. (best to keep the timer off their production forms)
    i have tConfig table with fld: Shutdown (y/n)
    every 20 seconds, the form looks to see if the flag is true, if so, it displays a shutdown message for 5 seconds, then shuts down the app: docmd.quit

    i can set the flag true remotely via linked table from my admin app.

  5. #5
    madpiet is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    154
    I remember from like 20 years ago, Arvin Meyer wrote some VBA code called "KickEmOut" that basically did this. I'd track it down and test it out.

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

Similar Threads

  1. track login and logout times
    By mahdinoori in forum Programming
    Replies: 1
    Last Post: 07-18-2017, 01:49 AM
  2. Tracking Login and Logout
    By billmark in forum Programming
    Replies: 3
    Last Post: 09-19-2016, 07:52 AM
  3. Replies: 8
    Last Post: 05-16-2016, 08:17 AM
  4. code for logout
    By rameshjctr in forum Programming
    Replies: 4
    Last Post: 04-20-2016, 10:24 PM
  5. Replies: 1
    Last Post: 02-17-2013, 06:54 AM

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