Results 1 to 6 of 6
  1. #1
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250

    Strange Write Conflict message when trying to change data


    Hello everyone,

    I work on a MS Access app based on MS SQL 2019. I have just run into this strange thing...

    I have a table tblShipments, which contains columns DateSent and DateReceived. When I process the shipment for the first time, it gets created automatically by a VBA code in the background, including the DateSent.
    Then I want to manually input DateReceived when I check that the item has been delivered to my customer.

    However, I'm not able to change the field (or any other field for that matter), with this associated error:
    https://support.microsoft.com/en-us/...2-b2a3d73ee775
    (Save Record option being grayed out).

    I don't understand this, because I am the only one using the database, everything is closed and so on.

    This happens in both forms and also when I try to manually update the value in MS Access linked table (from SQL Server).

    BUT, I am perfectly able to update any values directly within MS SQL Server! So this really seems more like an Access issue to me.
    And this definitely worked before. I did many changes to the system today (on SQL side, also VBA side, not the table design though), so it's quite impossible to pinpoint a single one to connect with this issue...

    Could you please advise what could be the reason here?

    Thank you very much,
    Tomas

  2. #2
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    EDIT:

    I just realized that this is happening with more tables, but not all of them.

    I tried to restart the SQL Server and Compact & Repair the Access app, which did not help.

  3. #3
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Have you relinked the tables without it picking up the primary key identifier on the tables?
    Without that Access can't update tables as it can't identify the record uniquely to perform the edit.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Do you have\added any bit fields into the SQL table? If yes, make sure they all have Allow Null=No and set a default value to 0 (or 1 as required):
    https://stackoverflow.com/questions/...write-conflict

    You will also need to update the existing records (UPDATE BitField SET BitField = 0 WHERE BitField Is Null).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Same response as Vlad but with a link to my own web article: Write Conflict Errors (isladogs.co.uk)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #6
    Thomasso is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Nov 2016
    Location
    Czech Republic
    Posts
    250
    Thank you for the suggestions. I made sure that there are no BIT fields with NULLS enabled,but that did not help (I only had one BIT field with allowed nulls before within the entire database anyways, and that was completely unrelated to this particular Shipping operation).

    However what did help was to add a TIMESTAMP column to every table (and also add those columns to views based on those tables).

    So thanks a lot! :-)

    Tomas

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-21-2019, 09:35 PM
  2. Get Write Conflict message due to my VBA code
    By mcomp72 in forum Programming
    Replies: 1
    Last Post: 11-07-2017, 01:41 AM
  3. Replies: 21
    Last Post: 09-16-2016, 08:44 PM
  4. Write Conflict
    By RayMilhon in forum Forms
    Replies: 16
    Last Post: 12-12-2014, 10:31 AM
  5. Write Conflict Error Message
    By AKQTS in forum Forms
    Replies: 2
    Last Post: 07-27-2010, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums