ndunwoodie said:
I have a database that I can't change unless I personally go to 150
machines and log the users off. Email requests for all users to log
off have been futile. Is there anything I can do?
Nick
First off, your applicaton should be split into two files. A shared "data
only" file on the network with each user having a separate copy of a "front
end" file on their local disk. With this setup you can work on your own
copy of the front end and then simply distribute it when finished. Since
most design changes only affect the front end this solves most of your
problems.
For changes to the data file your problem would still exist so here is what
used to do when I had MDBs for the back end...
Open a hidden form at startup. In the Timer event of that form test for a
value in a table with a single row. When the table is empty you do nothing.
When you find a value present then you prompt the user that they need to
exit the database. Use a separate form for the message, not a MessageBox
(you can't close an app with a MesageBox open).
The form that tells them to close the app has a timer with a 5 minute
countdown displayed. The form has an [OK] button that only hides the form
rather than close it (so the countdown keeps running). If the user doesn't
exit the app then code in the message form automatically does it for them at
the end of the countdown.
At startup you check the same single row table and immediately display a
message and close the app when the table is not empty (this keeps new people
from coming in).
It's not fool-proof because a user might have walked away from his machine
with a MessageBox opened in which case your Auto-Close stuff will never have
a chance to fire, but it does work 99% of the time. You would also want to
get the free LDB Viewer program from Microsoft's web site. That will tell
you which users are still in the file after the five minutes is up.