Results 1 to 11 of 11

Thread: Write Conflict

  1. #1
    Join Date
    Feb 2004
    Posts
    67

    Question Unanswered: Write Conflict

    When I try to update a record in a subform(datasheet), I get the following error message for certain records(Newly added) that I try to update:

    ================================================== =============
    Write Conflict:

    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 paste your changes back in if you decide to make changes.

    BUTTONS: "Save Record" (disabled), "Copy To Clipboard", "Drop Changes"
    ================================================== ==============

    Why can't I update the records?
    Is there code I can use to avoid this problems?

    Thanks...enviva

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Are both your mother form and daughter form bound to the same table, perhaps? On the other hand, the tables that are bound to the two forms need to have some relationship.

    Am I making sense?

    Sam

  3. #3
    Join Date
    Feb 2004
    Location
    Irving, TX (Dallas, Fort Worth)
    Posts
    379
    Quote Originally Posted by Enviva
    Is there code I can use to avoid this problems?
    Yes! You can set all fields unbound and write VBA to do all the updates!

    If have not done this before, ask how!

    DBS4M

  4. #4
    Join Date
    Feb 2004
    Posts
    67
    Hey Sam,

    I have the main form (Record source is empty). this form has a subformA whos record source is bound to a QueryA. Then I have a second subformB whos record sorce is bound to QueryB. Both Query A & B have the same tables, just querying different data.

    hope this helps you to help me...LOL
    thanks again....

  5. #5
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Um, sorry, Enviva, you're structure is about as problem-prone as can be. I suggest you go with dbsupport4me's approach. It's probably the only way you'll get the work done. Unless, of course, you want to start all over again from scratch.

    Sam

  6. #6
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Having two subforms shouldn't be a problem.

    The issue here is someone else is accessing a record at the same as you are accessing the same record (optimistic locking). Presumably your database is shared on a network.

    This can be sorted by setting the "Record Locks" property for each form/subform to "Edited Record". This means that when you have focus on the record, other users will not be able to edit it.

    Chris

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by howey
    Having two subforms shouldn't be a problem.

    The issue here is someone else is accessing a record at the same as you are accessing the same record (optimistic locking). Presumably your database is shared on a network.

    This can be sorted by setting the "Record Locks" property for each form/subform to "Edited Record". This means that when you have focus on the record, other users will not be able to edit it.

    Chris
    Hi Chris

    If the same user opens two forms bound to the same table and edits the same record in this table in both forms simultaneously (i.e. edits in frmA and then edits in frmB before frmA has committed the changes) you get this message. The error checking isn't sophisticated enough to know that the two users are both you - it just knows there are two connections to the table attempting to edit the same record.

    I know this because I once spent an entire afternoon trying to trace the other person accessing my supposedly personal db
    Testimonial:
    pootle flump
    ur codings are working excelent.

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Error

    Just a note: If you're using SQL Server as a backend, you need to put in a time-stamp field in the table. We had this problem with SQL Server even though there was nothing wrong with the code and forms.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  9. #9
    Join Date
    Feb 2004
    Posts
    67
    Hi pootle,

    Yes I am the only one who has access. I am trying to develope this program and I am working on a single computer. And I too have spent 2 afternoons trying to solve it, that is why I decided to ask the professionals. I will try to set the record locks to "edit".
    I still have not solved the Random question you were helping me with.
    thanks again...enviva

  10. #10
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Quote Originally Posted by pootle flump
    If the same user opens two forms bound to the same table and edits the same record in this table in both forms simultaneously (i.e. edits in frmA and then edits in frmB before frmA has committed the changes) you get this message. The error checking isn't sophisticated enough to know that the two users are both you - it just knows there are two connections to the table attempting to edit the same record.

    I know this because I once spent an entire afternoon trying to trace the other person accessing my supposedly personal db
    In which case we have conflicting results. Before posting I wondered what the result would be so I did some testing. I had no problems creating two subforms based on the same record source and editing the same record at the same time . No matter how hard I tried, one form would update the other without objection. The point is, IMHO, only one subform could ever have the focus (and therefore is editing) and this is where the exception lies (optimistically) i.e. I (in a single instance of Access sense) could only ever be editing in one form or the other but not both. I think you would have to open two instance of Access to create the problem (or be on two seperate computers). If you only have one instance on Access open then you can only ever be editing one record in once place i.e one form.

    So I haven't managed to replicate Enviva's problem as a single user. H'mmm...

    Worth a look at the d/b in question don't you think....

  11. #11
    Join Date
    Jun 2004
    Posts
    50
    Enviva,

    Post your db so that we can get our grubby hands all over it.

    (I think howey inplied the same )
    Monk
    The person who confesses ignorance shows it once; the person who conceals it shows it many times.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •