I am using a database on a server. I want to prevent 2 people accessing a single record at anytime to ammend it. I have ticked the lock edited records in Options
This is one of the most difficult areas in database programming I think. I have decided to take the following course of action for my current customers project.
I use only unbound forms. The user that first asks for the record gets their ID and a time stamp entered into the record in two fields, UserID and LockTime. If another users tries to grab the record they get a message like this...
"This Record is locked by 'UserID' until 'LockTime + Limit'"
Then they could take the record away from the first user depending on a password. This has worked great for me. Let me know if this helps. [sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
Well, sorry about the greek message I posted. The record locking issue is somthing you will find a lot of posting about if you search the forums for that key word. I did not spend very much time working with Access record locking choices (optimistic, or pesemistic) My customer did not want the ugly and confusing message regarding edit conflicts to come up in a user's face. My approach requires that any area where more than one user could edit the same record at the same time be managed in unbound forms. If you are not familular with unbound forms, this is a big step. In short, the user request a record by entering in some bit of information like the Customer ID, then I get that customers info and display it on the form. At the time I grab the info I also set a lock on the record as I explained above. When the user is done with the Customer record and saves it, the lock is removed.
If this seems like somthing you want to consider let me know. But be sure to check out the other postings related to this subject.
[sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
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.