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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record editing problems and corruption 1

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
586
GB
I have a database that is shared between 6 people. Occasionally two users will access the same record and one user will edit it, or perhaps sometimes both users are editing it at the same time. When the user goes to close the record access puts up a message saying that another user has aleterd the record and provides a few options, something like 'save changes' 'drop changes' etc. Often this seems to lead to database corruption and loss of the record. Is there a way of only allowing one person to edit a record or indeed only allow one person to view an indiviual record at one time. Ideally I would like to let two persons be able to access the record at one time, but I am keen to avoid these data corruption problems. Any ideas, thanks, Mark.
 
The situation you currently have is called "optimistic record locking". You are optimistic that the users will know what to do when simultaneous edits are made to a single record.

What you want to use is pesimistic record locking, whereby only one user can edit a record at any given time.

Have a look under Tools > Options > Advanced and change the "Default record locking" behaviour to "Edited record", also ensure the "Open databases using record-level locking" option is ticked, otherwise Access may lock more than one record whilst edits are being made. That should do the job.

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks Ed2020 -

I have followed the advice, but my database seems to work in juts the same way. i.e. when i change a record on two machines the seconf to close asks whether I want to save change, drop changes etc. Any idea where I am going wrong????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top