Could Not Update; Currently Locked

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anastassios Giannaras

    Could Not Update; Currently Locked



    Hello

    I have made an small access Database that is used by 4-5 people every
    day. Very often through the users get the message "Could Not Update;
    Currently Locked" There is an entry about that problem in the MS
    knowledge Base but I don't really understand how this could be solved.

    I would be extremely greatful if someone could explain to me in simple
    terms (if possible)what I need to do...

    Thank you in advance

    Anastassios



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • andybriggs

    #2
    Re: Could Not Update; Currently Locked


    The problem is that if one user is editing a record, you may find that
    lots of other records (typically 30-50) are also locked. This is
    because Access stores its data in "pages" of data that are 2k in size,
    so any record that is locked on the page will automatically lock all
    the others.



    You have three strategies for record locking. You can change these in
    the form's "Record Locks" property.



    1. No Locks (the default)



    User 1 starts editing a record. User 2 then starts editing the same
    record. User 1 exits the record, thus saving their changes. User 2 tries
    to exit the record - they will receive the error message "This record
    has changed since you started editing it", and are given the options to
    either save their changes (thus overwriting User 1's changes) or copy
    the record to the clipboard for possible insertion later.



    2. Edited Record



    This is, I suspect, what you are currently implementing. One user
    editing a record in a "page" of data will lock a number of other
    records. The locks are released when the user saves the record.



    3. All records



    Totally inflexible - only one user at a time can edit any record in
    the table.



    It's worth pointing out that Access XP and the new Access 2003 have
    changed the strategy so that when a user edits a record, only that
    record is locked and not the whole page.



    Try searching on "Record Locking" in Access Help for more information.





    Hope this helps and good luck.


    --
    Andy Briggs
    Elmhurst Solutions Limited
    Elmhurst Solutions offers a range of bespoke introduction and consulting services to a broad spectrum of corporate and individual clients, optimising supply chains & facilitating access to developing and emerging markets. With a competitive fee structure and a proven network…



    Posted via http://dbforums.com

    Comment

    • AccessDev

      #3
      Re: Could Not Update; Currently Locked

      Armin:

      Use the OnDirty property of the form to start a timer. If the record
      is not saved within a specified period of time, have the code undo the
      changes which will then free up the record for someone else to be able
      to edit.

      AccessDev

      Comment

      Working...