Trouble with Regular Locking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ABrown
    New Member
    • Aug 2007
    • 3

    Trouble with Regular Locking

    Hello,

    I have a 2003 database set up with about 20 users (only about 4 at a time) but I repeatedly get a problem with the records all locking. Each User is assigning billing codes to jobs so they each run a query that selects different work packs and then go through just those records. so there should be no way that the records should be the same.

    There is an issue when we run the append query to add more data to the table but it also happens at other times when there are just three of them working on it. is there anyway to remove all locking? I have each client database set to open in Shared as well as the server side and the default locking is No Locks, the error it comes up with is Can Not Update record currently locked. normally when it happens I have to get each user to shut down before restarting it. so really need to stop it locking in the first place.

    Thanks

    Adam
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by ABrown
    Hello,

    I have a 2003 database set up with about 20 users (only about 4 at a time) but I repeatedly get a problem with the records all locking. Each User is assigning billing codes to jobs so they each run a query that selects different work packs and then go through just those records. so there should be no way that the records should be the same.

    There is an issue when we run the append query to add more data to the table but it also happens at other times when there are just three of them working on it. is there anyway to remove all locking? I have each client database set to open in Shared as well as the server side and the default locking is No Locks, the error it comes up with is Can Not Update record currently locked. normally when it happens I have to get each user to shut down before restarting it. so really need to stop it locking in the first place.

    Thanks

    Adam
    Running a background process (like an append query) at the same a user is entering data on a form that is bound to the same table that is being updated will definitely cause a lock conflict, unless you can save the form changes before the append query is run, If the code to run the append query is behind the form that the users are using, placing the following code on the line before you execute the Append query may help:

    If Me.Dirty Then
    Me.Dirty = False
    End If

    Otherwise, you might have to consider other alternatives, like using an unbound form or running the append query at a scheduled time when users are off the system.

    Comment

    Working...