Results 1 to 8 of 8
  1. #1
    xopherira is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Indiana
    Posts
    53

    Compare and combine two tables with query.


    I have two tables that I need to query and combine. First table is the template and has part number, group number and serial number, with serial number being blank. Second table being imported has part number, group number and serial number, which serial number is provided. I need to compare part number and group Id and have the serial number value added to template. I am new to access and not sure how to query and build a table out of two tables. Also, anyone know where a good tutorial on debugging this stuff is located?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,526
    Q1 run append query to the new table.
    Q2 run an update query to update new tables SN field.

    (or just run the update the SN field in table 1 from table 2)

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742

  4. #4
    xopherira is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Indiana
    Posts
    53
    Tried to run the update from table 1 from table 2 but get a prompt to enter parameter value. How do I remedy this, what am I missing? Also, if I add table 2 to select it returns to many values. Do table 1 and table 2 need to have same number of columns to upate properly?

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742

  6. #6
    xopherira is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Indiana
    Posts
    53
    I can't post anything direct from question due to the nature of my job and data that is involved. I have provided pseudo example.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Take you query sql, and change the nature of the data to something inert ---
    Houses and Rooms, States and Cities, Students and Courses-- whatever you're comfortable with.

    It isn't the specific data so much as the concepts involved.

    As for debugging, I gave you a reference earlier --did you review it?

  8. #8
    xopherira is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2015
    Location
    Indiana
    Posts
    53
    Yes saw the debugging, one question. Does this also work for access or do I have to convert code. I will post query tomorrow, on work PC.

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

Similar Threads

  1. Replies: 8
    Last Post: 06-05-2015, 02:17 PM
  2. Replies: 7
    Last Post: 01-29-2014, 02:45 PM
  3. Replies: 12
    Last Post: 04-25-2013, 01:32 PM
  4. Switch function query to combine tables
    By sandlucky in forum Queries
    Replies: 2
    Last Post: 03-29-2011, 09:46 PM
  5. combine three tables in a query
    By neuenglander in forum Queries
    Replies: 0
    Last Post: 08-21-2008, 04:02 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