Microsoft Access

MS Access – Knock Users Out of Database

AutoLogoutSo many times I needed to do maintenance on the database then update the frontend but couldn’t because other users had it open. Well, I finally found a fix! Now I can give the users a warning before the database closes on them. Here’s how:

  1. Go to this site and download the file. (Scroll down and the link is right before the comments). https://www.databasejournal.com/features/msaccess/article.php/3548586/Auto-Logout-Users-for-DB-Maintenance.htm#
  2. Open your FRONTEND database and the database you just downloaded. Drag the table from the downloaded database over to your database. The table must be a local table, not on your backend.
  3. Go to your forms then drag the three forms from the downloaded database over to your database. You’re done with the downloaded database so you can close it.
  4. In your database, click in the Navigation pane, click the drop-down menu and choose “Macros”.
  5. Right-click the “autoexec” macro and choose “Design View”.
  6. Add a New Action – Click the down arrow and choose “OpenForm”. Next to form name, choose “frmDemo”. Next to Window Mode, choose “Hidden”.
  7. Add a New Action – Click the down arrow and choose “Open Form”. Next to form name, choose “frmLogoutTimer”. Next to Window Mode, choose “Hidden”. Save

When you are ready to save to the frontend after you’ve done maintenance,

  1. Open the Frontend database. Go to forms and open “frmDemo”.
  2. Check the box that says “Logout All Users”. Then open form “frmLogoutTimer” and click “Run”. It takes a few seconds before the popup will show up on the users interface, however after about 3 minutes, all users should be logged out automatically. Don’t forget to uncheck the box when you are finished.

By Rana Kory

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s