1. Am I right that if a user open the database in exclusive mode, meaning no other user can open it?
2. Is it possible to use vba to
a)Check for how many user are using the database, if I am the only one
b)Reopen the access database in exslusive mode?
To close and open the database you will need the following methods. The latter allows you to specify opening the database exclusively.
CloseCurrentDatabase
OpenCurrentDatabase
As for checking if you are the only user... The only thing that comes to mind is reading the LDB file.
Perhaps a better way is to make a second database file that you open via automation that closes the database you are conscerned about and trys to open it exclusively. If it is already opened by someone else, you will get an error that you can trap and handle (perhaps reopen the database not exclusively?).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.