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

Record Locking

P: 6
Hey guys, im trying to write some code to lock a record and prevent anyone from viewing/editing that record until that record has been edited and the user has moved on to the next record.... any idea how??? Thanks!
Feb 20 '08 #1
Share this Question
Share on Google+
5 Replies


Scott Price
Expert 100+
P: 1,384
Unless I'm misunderstanding what you are referring to, this is automatically handled by Access already. No need to duplicate their efforts. The .ldb file keeps the log of who is accessing which record and when, thereby preventing two users from changing the same data at the same time.

Regards,
Scott
Feb 20 '08 #2

P: 6
Unless I'm misunderstanding what you are referring to, this is automatically handled by Access already. No need to duplicate their efforts. The .ldb file keeps the log of who is accessing which record and when, thereby preventing two users from changing the same data at the same time.

Regards,
Scott
i also dont want them to be able to view the data either, until its been edited by the person, any idea how?
Feb 20 '08 #3

Scott Price
Expert 100+
P: 1,384
In my experience working with this type of situation, the least of your worries is having someone be able to view a record that someone else is in the process of updating.

I'm not aware of a simple way to do what you are asking, it may well be that there is a way to do this, but it would require some fairly intrusive code. I think you'll find that the risks outweigh the benefits.

If you wish to go ahead, I can do a little research, but I can't hold out a lot of hope on turning up anything magic.

Regards,
Scott
Feb 20 '08 #4

P: 6
In my experience working with this type of situation, the least of your worries is having someone be able to view a record that someone else is in the process of updating.

I'm not aware of a simple way to do what you are asking, it may well be that there is a way to do this, but it would require some fairly intrusive code. I think you'll find that the risks outweigh the benefits.

If you wish to go ahead, I can do a little research, but I can't hold out a lot of hope on turning up anything magic.

Regards,
Scott
man that would be awesome Scott! Thanks allot
Feb 25 '08 #5

Scott Price
Expert 100+
P: 1,384
Have a look at this MS knowledge base article that discusses optimistic versus pessimistic record locking.

Let your fingers do a little walking through the help files and you will find out how to implement pessimistic, page level locking. (Im not at my main computer for the next two days, so cant do more of this for you, but you`ll learn more this way :)

Page level locking means that when a user edits one record, any records that are contiguous and fit within the 4kb page size are locked as well.

Good luck and regards,
Scott
Feb 25 '08 #6

Post your reply

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