Results 1 to 3 of 3
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    Update query rules error

    Hi



    I have two tables that have records with duplicate fields

    I created a query to list the duplicates - 3920 in total

    Code:
    SELECT tblDeceased.Inscription, tblMemorial.Inscription, tblDeceased.Forenames, tblDeceased.Mlink, tblMemorial.Mlink
    FROM tblMemorial INNER JOIN (tblDeceased INNER JOIN tblJoin ON tblDeceased.GraveID = tblJoin.fkGraveID) ON tblMemorial.MemorialID = tblJoin.fkMemorialId
    WHERE (((tblDeceased.Inscription)=[tblMemorial]![Inscription]));

    I then changed it to an update query

    Code:
    UPDATE tblMemorial INNER JOIN (tblDeceased INNER JOIN tblJoin ON tblDeceased.GraveID = tblJoin.fkGraveID) ON tblMemorial.MemorialID = tblJoin.fkMemorialId SET tblDeceased.Inscription = ""
    WHERE (((tblDeceased.Inscription)=[tblMemorial]![Inscription]));

    But the update does not work due to violation rules

    I'm assuming it's because I'm updating a reference field?

    So how do I do this

    thanks

    Ian

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    you can update reference fields, but you cannot update autonums.
    nor fields if a rule is set.
    and some joins cannot update.

  3. #3
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    thanks for the hint , it appears to be the join
    so I re madethe query and it worked

    cheers

    Ian

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

Similar Threads

  1. Update query error
    By msaccessdev in forum Access
    Replies: 1
    Last Post: 06-06-2014, 06:08 AM
  2. Replies: 7
    Last Post: 01-08-2014, 10:36 AM
  3. Update query Error
    By rd.prasanna in forum Queries
    Replies: 1
    Last Post: 10-04-2013, 03:01 AM
  4. Field rules/validation rules
    By sk88 in forum Access
    Replies: 14
    Last Post: 02-26-2012, 01:03 PM
  5. Updateable query rules
    By gg80 in forum Queries
    Replies: 7
    Last Post: 01-05-2011, 11:50 PM

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