How Can I Kick Someone Out Of A Shared Database?

Access World Forums
  • Home
  • Forums New posts Search forums
  • What's new Featured content New posts New profile posts Latest activity
  • Members Current visitors New profile posts Search profile posts
Log in Register What's new Search

Search

Everywhere Threads This forum This thread Search titles only By: Search Advanced search…
  • New posts
  • Search forums
Menu Log in Register Install the app Install How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

  • Home
  • Forums
  • Microsoft Access Discussion
  • General
You are using an out of date browser. It may not display this or other websites correctly.You should upgrade or use an alternative browser. How can I kick someone out of a shared database? (1 Viewer)
  • Thread starter Thread starter Wag2016
  • Start date Start date Mar 23, 2016
W

Wag2016

Registered User.
Local time Today, 06:35 Joined Mar 5, 2016 Messages 24 I have a split database with each user having their own frontend copy. Sometimes people leave their database open for extended periods of time. This affects my ability to make any table changes. Is there a way to kick a user out? Thank you! MarkK

MarkK

bit cruncher
Local time Today, 03:35 Joined Mar 17, 2004 Messages 8,623 How often do you make table changes? This should be an extremely rare event, and not part of your regular workflow. M

midmented

DP Programmer
Local time Today, 06:35 Joined Jun 5, 2008 Messages 94 I made a table called tblMaintenance with one field (yes/no) and put a timer event on the main form to check tblMaintenenace for a yes checked every 2 minutes. If yes is checked, another form pops up that has a timer event (and gives a 2 minute warning) that closes the application after 2 minutes. When I am done, I simply uncheck the yes/no checkbox in tblMaintenance. Also, make an event (under Form_activate) on your main form to check tblMaintenance. Display a message saying closed for maintenance (if tblMaintenance field= yes), close the application after message box ok. The_Doc_Man

The_Doc_Man

Immoderate Moderator
Staff member Local time Today, 05:35 Joined Feb 28, 2001 Messages 30,868 There is no way for you to externally kill a session without one of those desktop-sharing programs. But there IS a way for you to program the application to kill itself. The only way I know to make this work is to assure that your users do not see the navigation pane. You need a switchboard or dispatcher form that never closes and that stays maximized. When you open a new form from the dispatcher, be sure to use DoCmd.BringToFront (or you can look up the Win32 API call that does this). The point is that your working forms hide everything else, too. You will also need to assure that nobody sees the ribbon or menu bar (depending on your version of Access). Then, as midmented suggests, have a Timer event in a form. I always have it in the main switchboard form. Make it capable of kicking folks out via Application.Quit, and be sure that if you are going to kick folks out, you have a Form_Close event on every form that can track the state of the form to know if it is dirty or not. If it is, you can also force an Undo before closing individual forms. It isn't easy but it is doable. arnelgp

arnelgp

..forever waiting... waiting for jellybean!
Local time Today, 19:35 Joined May 7, 2009 Messages 20,781 Try this link http://www.accessmvp.com/JConrad/accessjunkie/kickoff.html M

midmented

DP Programmer
Local time Today, 06:35 Joined Jun 5, 2008 Messages 94 good link! I've been using a version like one of them listed in your link: http://www.databasejournal.com/features/msaccess/article.php/3548586/Auto-Logout-Users-for-DB-Maintenance.htm I modified mine over the years but it has worked perfectly and never once failed for over 5 years. R

ravi_msh

New member
Local time Today, 17:05 Joined Oct 16, 2018 Messages 2 Hi, I suggest that never rely on flags. Your application may fail in case of a software, hardware or power failure. State of flags will be out of control then. Best way is to, at back-end PC, open a form with trivial table that is nowhere used in your application. Set record locks to all records. Now at front end application periodically add and delete some random data to this table. When form is opened at backend, you will get error 3262. Capture this error to close your application. This is failure proof. Gasman

Gasman

Enthusiastic Amateur
Local time Today, 11:35 Joined Sep 21, 2011 Messages 17,604 How does that kick people off the DB?
ravi_msh said: Hi, I suggest that never rely on flags. Your application may fail in case of a software, hardware or power failure. State of flags will be out of control then. Best way is to, at back-end PC, open a form with trivial table that is nowhere used in your application. Set record locks to all records. Now at front end application periodically add and delete some random data to this table. When form is opened at backend, you will get error 3262. Capture this error to close your application. This is failure proof. Click to expand...
The_Doc_Man

The_Doc_Man

Immoderate Moderator
Staff member Local time Today, 05:35 Joined Feb 28, 2001 Messages 30,868 ravi, if you lose power, you have for all practical purposes lost the connection and the session - and probably corrupted the database in the case of an Access shared back-end. B

bdra2778

Registered User.
Local time Today, 03:35 Joined Feb 14, 2019 Messages 34 Another way is to add a timer form and Autoexec Macro in Front End dbs, checking time of non-activity, passed a few minutes, then close all conexcion or exit from program. See this link: www.access-programmers.co.uk/forums/showthread.php?t=84557 Regards Last edited by a moderator: Feb 23, 2019 You must log in or register to reply here.

Similar threads

S Batch file for updating local frontend Access database copy
  • Sheridan
  • Aug 29, 2025
  • General
2 Replies 26 Views 4,495 Sep 3, 2025 arnelgp arnelgp T Back End Read-Only Issue
  • thomas.dickens
  • Sep 15, 2025
  • General
2 Replies 26 Views 2,809 Sep 29, 2025 Gasman Gasman B Access window forces itself into the foreground when form updates
  • Bennet
  • Jul 28, 2025
  • General
Replies 7 Views 978 Jul 31, 2025 Gasman Gasman D Darshan Hiranandani : How to Delete Access Lock Files and Prevent Future Issues?
  • darshanhiranandani24
  • Jan 16, 2025
  • General
Replies 2 Views 792 Jan 16, 2025 DHookom DHookom J Row Height of subform reverts back
  • jco23
  • Sep 2, 2025
  • Forms
Replies 12 Views 1,253 Sep 3, 2025 jco23 J

Users who are viewing this thread

Total: 2 (members: 0, guests: 2) Share: Facebook X (Twitter) LinkedIn Reddit Pinterest Tumblr WhatsApp Email Share Link
  • Home
  • Forums
  • Microsoft Access Discussion
  • General
Back Top Bottom Text copied to clipboard.

Tag » How To Kick User Out Of Ms Access