Single instance only of access 2010 database at any time

RichStone

Registered User.
Local time
Today, 05:05
Joined
Oct 18, 2013
Messages
21
I know that this subject has been discussed a few time on here but I'm hoping somebody can help me with a more direct solution.

I have a database sat on our work server and each user approved to use it has a shortcut to it on their desktop. I would like to ensure that only one person can use it at any time. The way I would like to do it is that when the first user logs in, the database runs normally. However, if another user then tries to log in a window pops up saying that the database is in use elsewhere and that nobody else can use it at this time.

I look forward to hearing some ideas or possibly solutions!
 
This really sounds as if you should be splitting the database and giving each user a separate front end, with your back end on the network.
The following is fraught with issues - you have to ensure that the database can only be closed in a very prescribed manner, and you need some method of being able to reset the InUse flag if the database crashes otherwise no one can ever get back in.
You can easily create a InUseBy flag field in a "MyDBSystemTbl" in your database.
When a user logs in check that the InUseBy Field is empty, if not they can't progress any further. If they are allowed to progress fill in the InUseBy Field with their User ID.
When they close the database remove them from the InUSeBy field. Job done simples.
Until it crashes or someone has a network issue and leaves them showing as in the database. Then you need your escape plan in place to reset things. Probably a Admin only login that will overwrite the current user and the exit gracefully.
 
and of course, going on from what Minty said - you need to be able to solve the problem of the guy who opens the database, and then fails to close it, preventing other users from using it.

To be honest, given that Access is concurrent multi-user, it's better to use at in that way.
 

Users who are viewing this thread

Back
Top Bottom