Results 1 to 6 of 6
  1. #1
    Caulerpa is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2013
    Posts
    4

    Table Union Question

    Hello Everyone!

    Okay I have a SIMPLER way of putting my other question AND I've added a visual to help! I have Table A and Table B. Both tables have three columns: SAMPLE ID (will match in both tables), RESULTS, and SAMPLE_METHOD. There is sample method X and Y.



    Right now when I make a union between two tables it spits out three columns and sample X and Y are both in the same column. What I'm looking for is a way to have a union spit out a table with FIVE columns: STAMPLE ID, SAMPLE METHOD X, RESULTS X, SAMPLE METHOD Y, RESULTS Y. If this doesn't make sense I tried to make a visual below.

    Click image for larger version. 

Name:	Access Problem 1-14-13.jpg 
Views:	9 
Size:	85.3 KB 
ID:	10711

    Anyway, if you could offer any help I would really appreciate it.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You don't want a union query, just a standard join. Add both tables to a new query. If one doesn't appear automatically, click/drag to create a join between the sample ID fields in both tables. Double click on the fields from each table desired in the result. see if that gets you the result you're after.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Caulerpa is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2013
    Posts
    4
    Thank you for your response! Unfortunately, I did exactly what you told me to do and NOTHING came back from the query :[

    Thank you though.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is the SQL of the query? Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Caulerpa is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2013
    Posts
    4
    ARGH! I just realized the Sample ID's are NOT the same in both tables! -_- sorry for wasting your time.

    I just realized what I really need to do is first pull data from both tables based on their GROUP ID and then only grab data from both tables if they have the same sample intervals. I can't really post anything directly related to what I'm working on because it's company property - sorry to make it more difficult.

    A revised image of what I need is below.

    Click image for larger version. 

Name:	Access Problem Revised 1-14-13.jpg 
Views:	4 
Size:	127.9 KB 
ID:	10717

    Again, I have never used Access before and was told I needed to do this so if you're still willing to help me after I made a mistake I would be most appreciative.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Well, I'd give the same answer with a twist. We join tables in a query using the field or fields which relate them. From the sound of it, perhaps that's all 3 fields?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Unable to edit data in Union table
    By D4WNO in forum Access
    Replies: 2
    Last Post: 08-15-2012, 06:56 AM
  2. Form to table question
    By manin in forum Forms
    Replies: 4
    Last Post: 04-14-2012, 08:38 AM
  3. how to update in a table union all query
    By learning_graccess in forum Queries
    Replies: 4
    Last Post: 03-31-2012, 07:32 AM
  4. Union Query Question
    By jpkeller55 in forum Access
    Replies: 2
    Last Post: 09-24-2010, 10:18 AM
  5. Create table out of union query
    By DKruse1969 in forum Queries
    Replies: 2
    Last Post: 08-28-2009, 09:55 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