Have you ever needed to work on an application and
couldn’tbecause someone had a lock on either the front-end or the back-end? Some of you have probably already incorporated a similar feature into your own applications, but I’ve seen a couple of posts recently on several Access websites, so I thought I’d share the method I use in my most recent article.
In close to 10 years of using this technique, I cannot recall a single time when this did not achieve my goal of booting all users out of an application. However, as several of my peers have pointed out, there are exceptions where this will not work.
1. If there is a MsgBox displayed on screen when the ForceLogoff form attempts to close the application, it will close all of the forms, but the existence of the msgbox will prevent Access from closing.
2. If you have a form/subform combination where you have some error checking in the main form which would prevent it from closing if the number of records or sum of the balance on the subform does not match what is in the main form, then my code would not be able to overcome that situation either