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.
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.
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.
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,
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.
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.