Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Write Conflict error messge (Win ME/Access 97)

    This is the first time this has happened. I have done other applications on this same machine without this error.

    I am updating a field using the Got Focus event. When I leave the field, I get the error message, Write Conflict. This is a stand-alone system. I have done something different this time, but I don't know what. I have a Refresh command in the VBA routine before closing the tables. If I take that out, the message doesn't come up until I press the Refresh button on the menu.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Write Conflict error messge (Win ME/Access 97)

    It sounds as if the lock file (.ldb) file may have not been deleted from a previous session - at least that's one possibility. Another is that you are trying to do two updates without saving the record first.
    Wendell

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Write Conflict error messge (Win ME/Access 97)

    Let's talk about the lock file. Looking through the help file, it looks like that file is created when you open a linked table. I do not use linked tables in this application, and I have reviewed to be sure that after each .edit I have an .update. Is that what you mean by "saving" the table. Also, I am closing all RecordSets after updating the field. In other words, I start the VBA routine with an On Got Focus event, update the field, and close the RecordSets after finishing the routine and before returning to the form.

    I looked up Save in the help file, and got a DoCmd.Save, but it is not for Recordsets, so I couldn't do much more with that idea. I tried it out using the table name behind the Recordset, but no good.

    Any other ideas, please?

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Write Conflict error messge (Win ME/Access 97)

    The help file has led you astray. The ldb file is used to store information about what user has locked what page in Access - if memory servers me correctly, pages in Access97 were 2KB. There is a common scenario where a user has locked a particular page in order to edit it - myRecSet.Edit applies a lock - and then the system crashes. In that case the lock never gets removed, and you can get an erroneous message saying you can't edit a record. Make sure all Access sessions have been closed, and then check in the same directory as the .mdb file and see if a .ldb file with the same prefix exists. If it does, delete it, and then try editing again. If it doesn't, then you are having some other problem. By chance are you using a form that is bound to a table or query that is also the basis for your recordset? If so, when you change a field that is displayed on the form and a part of the data source, you will likely get an error message saying something like "some other uses has made changes and your changes can't be saved..
    Wendell

  5. #5
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Write Conflict error messge (Win ME/Access 97)

    Thanks for the reply. I had checked yesterday for the existence of a .ldb file. There are none. The main form and the sub form are based on different queries, and the queries are based on different tables, so that eliminates that point. Where do you guys learn all of this stuff?

    I have used this technique in another application, and am following the first application as a guide. Can't see what I am doing different this time. I am frustrated.

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Write Conflict error messge (Win ME/Access 97)

    Answering your question first, we spent ten years being frustrated <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>! Seriously, Access is IMHO the most powerful desktop application ever created (Excelites would argue), and there are literally dozens of ways to solve most problems with it. I always try to use the simplest approach I know of, and only resort to code when nothing else will solve the problem. That said, I still write a fair bit of code from time to time.

    The fact that you have a main form and a sub form may be part of what's going on here, but until we see the code involved and the order in which it's being executed, we're pretty much taking shots in the dark. You can try posting the code and the sequence of events, or if you can shrink you DB down to something that can be attached, one of the loungers could look at it and see what's up.
    Wendell

  7. #7
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Write Conflict error messge (Win ME/Access 97)

    I went back and put a Refresh command in each of the On Got Focus event procedures, even if there were no calculations involved, and that has resolved the problem. It has not cleared up my doubts as to why. What exactly happens when I close the Recordsets in my event procedures? Is everything saved to the file? The Write Conflict error message gave me the option to put the record to be saved on the clipboard. I did that, and that is where I got started on the solution. Things were not as I had thought.

    I have been at this since 5 AM, and am learning all sorts of things. The most important is that the application works as it should.

    Thank you very much. (I will be back, for sure.)

Posting Permissions

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