Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record-Locking...(seeing which user has the record open)

Status
Not open for further replies.

THEGREEK

Technical User
Aug 17, 2000
51
CA
Hi everyone,

Is there anyway to detect which user currently has a certain record open (let's call the user "JSMITH"). Ideally I would like; when a user opens a form with an underlying record based on it. The OTHER user that now tries to access that same record gets something like a msgbox saying "sorry you can't edit this record at this time, beause "JSMITH" is currently editing this record. I hope there is a way :)

Thanks in advance,
THEGREEK
 

There probably is a way if you know how to take the ldb file apart since this is where the locking information is stored. Unfortunately, I don't know how to do that.

Uncle Jack
 
I had a cross reference table with Names, and the UserID always had a specific letter in the same position, so it was easy for me to get the username of the people who were possibly in the database. Unfortunately, the ldb file is created when the first person accesses the table/database and remains open until all users are out of it. UserID's get added, but not removed. Therefore all you could do is get a list of all the possible users who could be editing the record.

I have never used record locking, so I am sorry that all I can do is discount the only suggestion you have.
 
Sounds like you want to lock all records as soon as opened rather than locking when edited. Access can handle that but it is very restrictive. Check the following link.

About choosing a record-locking strategy in an Access database in a multiuser environment

You'll want to select record locking rather than page locking. Check this link.

Page-Level Locking vs. Record-Level Locking

Multiuser Settings
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top