Unanswered: Setting, Detecting, and Clearing File Locks
I have an Access Database, and it will be used in a networked environment. The Maximum number of users is 2 or 3, and only one of them will be assumed to be using it at any given instance of time. here is an important question:
I need to find a way to only allow one user to open the database files at any given time. Is there a way to "lock" files, detect such locks, and clear them to implement such a feature? If so, How can I do it?
Under the Tools menu...select Options then select the Advanced tab. Set the Default Record Locking options to Edited Record. With this set, no one can work on the same record. They can on other records but not the one you are currently editing. If you want to Lock everything then set the option to All Records. When All Records option is selected then no records can be edited while the database is in use by a individual.
If you want, you can bring up the Options window from a Command button by entering this line of code into the On Click event: