Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2016
    Posts
    2

    Data from field in one table to another table

    I have the following 2 tables:



    Table 1:
    Partner Number Name Donor ID
    1234 John Smith
    2432 Ed Jones

    Imported Table 2:
    Partner Number Donor ID
    1234 G5845-425-IR788
    2432 K8978-111-PQ007


    Table1 has other fields like address, email etc. Table 2 is imported info from Excel. It is a download of donations along with a lookup that gets me the Partner Number.

    I want to get the Donor ID from Table2 into the same named field in table1. I would think an update query would be the way to go, but I am not understanding how to make that happen.

  2. #2
    face is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Location
    South Carolina
    Posts
    7
    UPDATE Table1 LEFT JOIN Table2 ON Table1.[Partner Number] = Table2.[Partner Number] SET Table1.[Donor ID] = [Table2].[Donor ID];

  3. #3
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Yes, an Update Query is the way to go.
    The SQL code would look something like this:
    Code:
    UPDATE Table1 
    INNER JOIN Table2 
    ON Table1.[Partner Number] = Table2.[Partner Number] 
    SET Table1.[Donor ID] = [Table2]![Donor ID]
    WHERE Table1.[Donor ID] Is Null;
    By adding the WHERE... criteria, it will only look to update records that do not already have a Donor ID in table 1.

  4. #4
    Join Date
    Dec 2016
    Posts
    2
    Worked perfect JoeM. Thank you for your help.

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

Similar Threads

  1. Replies: 9
    Last Post: 05-26-2016, 05:13 PM
  2. Replies: 3
    Last Post: 03-07-2014, 10:39 AM
  3. Replies: 7
    Last Post: 03-21-2013, 09:43 AM
  4. Replies: 2
    Last Post: 10-24-2012, 02:53 PM
  5. Replies: 5
    Last Post: 03-01-2012, 12:59 AM

Tags for this Thread

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