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 code problem

    Hi



    got myself in a bit of a mess - I have two table

    table 1 (tblDeceased)contains:

    GraveID, Mlink,Plot,GraveNo,Map,Forenames,Surname,Age,DayOf Death,MonthOfDeath,YearOfDeath,DayofBurial,MonthOf Burial,YearOfBurial,Inscription,PP,Notes,Notes_2

    The second table (tblGraves_2015) contains the exact fields

    I want to update ([tblDeceased]![Notes_2] with the values from [tblGraves_2015]![Notes_2015]

    I assumed this would use an update query

    So I wanted the update query criteria to be update providing the fields Plot,GraveNo,Forenames and Surname were the same in both tables.

    So ( Having learnt wizards are a double edged sword) I selected Query Design and double clicked on tblDeceased and tblGraves_2015.

    I then dragged the mouse from Mlink to Mlink to create a "relationship"

    I then pressed the Update button.

    In the box I selected : field to be Notes_2 and the table to be tblDeceased

    I then selected the Update To: option and started to type tbl... expecting in the drop down box to see tblGraves_2015

    But it does not appear in the list.

    So my sql is as below

    Code:
    UPDATE Graves_2015 INNER JOIN tblDeceased ON Graves_2015.MLink = tblDeceased.Mlink SET tblDeceased.notes_2 = ;
    Is my method wrong or have I missed a step

    thanks

    Ian

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You shouldnt make table names with dates on them. tblGraves is sufficient.

    Yes, you use update queries, but Access cannot update MEMO fields, so I hope your NOTES field is NOT that.

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

    dammed Memo fields!!!!

    thanks

    Ian

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

Similar Threads

  1. Update Query SQL Code Help!!!
    By Crawfordrider33 in forum Access
    Replies: 3
    Last Post: 05-06-2015, 09:05 AM
  2. Hello Everyone!! UPDATE query VBA Code
    By Jllera in forum Programming
    Replies: 12
    Last Post: 03-06-2015, 08:46 PM
  3. Update Query by VBA code
    By ice051505 in forum Programming
    Replies: 10
    Last Post: 02-25-2013, 10:49 AM
  4. Problem with INSERT INTO query code
    By rghollenbeck in forum Queries
    Replies: 8
    Last Post: 09-27-2011, 12:16 PM
  5. Update query problem
    By pratim09 in forum Queries
    Replies: 5
    Last Post: 05-05-2011, 06:05 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