Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2005

Tip: Looking for answers? Try searching our database.

How to lock a record to prevent two users from editing the same record at the same time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LisaB - 16 Dec 2005 16:35 GMT
my application is an Access 2000 front-end connected to a SQL 2000 database
back-end

My problem is when two or more users are editing the same record at the same
time, the first person who exits the record gets their changes saved,
everyone else's changes are droped.

I would like to know if there is a way to lock a record for editing.
a.  When one person opens a record, that record is available to be edited by
that person only
b.  When the second person opens the same record, they are only allowed to
view the record. (maybe a message appears that the record is currently being
edited by another user)

****note ****  I've tested it and found that even if I am the first person
to open a record and start editing it ... if a second person opens the
record and makes any changes then closes before I close, their changes are
kept and mine are droped.  I get one off two possible messages:

The data has been changed.
Another user edited this record and saved the changes before you attempted
to save your changes.
Re-edit the record

or

This record has been changed by another user since you started editing it.
If you save the record, you will overwrite the changes the other user made.
Copying the changes to the clipboard will let you look at the values the
other user entered, and then paste your changes back in if you decide to
make changes.
************
LisaB - 16 Dec 2005 16:58 GMT
I think I may have found my answer the the following knowledge base articles

http://support.microsoft.com/default.aspx?scid=kb;en-us;302492
http://support.microsoft.com/default.aspx?scid=kb;en-us;280730

> my application is an Access 2000 front-end connected to a SQL 2000 database
> back-end
[quoted text clipped - 28 lines]
> make changes.
> ************
LisaB - 16 Dec 2005 20:17 GMT
No - I take it back.  I am still able to edit a record that another users is
editing and one of us gets the error message.

I still would like to here from anyone who has a suggestion for fixing this
problem

> I think I may have found my answer the the following knowledge base articles
>
[quoted text clipped - 38 lines]
> > make changes.
> > ************
Kevin K. Sullivan - 16 Dec 2005 21:44 GMT
In your form(s), check the Record Locks property in design view.  It
sounds like you have "No Locks", the default, and you want "Edited
Record".  Press F1 while in the Record Locks property to get a pretty
good description.  The second person to begin a edit will find that
record is locked.

HTH,

Kevin

> No - I take it back.  I am still able to edit a record that another users is
> editing and one of us gets the error message.
[quoted text clipped - 73 lines]
>>>make changes.
>>>************
LisaB - 19 Dec 2005 14:30 GMT
Yes, I tried that.  It still allows two people to edit a record.  If the
tables were Access tables then the locks work.  However, because the
database is an attached SQL database the lock properties get ignored.

> In your form(s), check the Record Locks property in design view.  It
> sounds like you have "No Locks", the default, and you want "Edited
[quoted text clipped - 83 lines]
> >>>make changes.
> >>>************
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.