By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,503 Members | 2,730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,503 IT Pros & Developers. It's quick & easy.

MS Access User locking

P: 5
Just want to know I created a database and created a form and I give access to certain user to get in and add the stuff. For example If I am adding a record or changing something in that record and another user open the same record can we lock that 2nd user until the first user finish and close that form. Let me know what is easiest way to do this so that the 2nd user get the message as current record is locked or exclusive cant change the record or locked by another user. Let me know. Thanks and appreciated.
Oct 9 '07 #1
Share this Question
Share on Google+
4 Replies


nico5038
Expert 2.5K+
P: 3,072
Locking records can be risky. What happens when userA forgets his update and goes home....
In general I leave the concurrent update problem being handled by Access as there will be a warning when there has been an update on the same record by someone else. (In general a very rare occasion)
When you want to handle it yourself it's best to record the last user that updated the record and when (datetime) and check before updating or the data is still the same (by reading the same record again). When unequal you can ask the user what to do and show the changed fields.

Getting the idea ?

Nic;o)
Oct 10 '07 #2

P: 5
Locking records can be risky. What happens when userA forgets his update and goes home....
In general I leave the concurrent update problem being handled by Access as there will be a warning when there has been an update on the same record by someone else. (In general a very rare occasion)
When you want to handle it yourself it's best to record the last user that updated the record and when (datetime) and check before updating or the data is still the same (by reading the same record again). When unequal you can ask the user what to do and show the changed fields.

Getting the idea ?

Nic;o)

So What I have to select in Access when I got to Tools/Options/Advance. On Default Open Mode shall I select Shared or Exclusive and also on the default record lokcing what record locking I have to select No locks or All Records or Edited Records. Let me know. Thanks and appreciated.
Oct 10 '07 #3

P: 5
So What I have to select in Access when I got to Tools/Options/Advance. On Default Open Mode shall I select Shared or Exclusive and also on the default record lokcing what record locking I have to select No locks or All Records or Edited Records. Let me know. Thanks and appreciated.
Oct 10 '07 #4

nico5038
Expert 2.5K+
P: 3,072
I always use "Shared". Using "Exclusive" will allow just one user to do updates (the first that opens the database) and when this user closes the .mdb it will be free for another (the next first to open the .mdb) to lock it again.
Certainly "safe", but not really workable....
Just read the Help fiel (Press F1) on the matter.

Nic;o)
Oct 10 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.