Results 1 to 2 of 2
  1. #1
    mrfourpointo is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    1

    Find records not in another table OR are in the table with a specific field value

    In Table A, I have many fields that I am pulling into a query, some with criteria. One of my fields is Last_Name. I would like my query to include all records that are in Table A and not in Table B AND all records that are also in Table B, but have a certain value for a field in Table B.

    Table A
    Last_Name
    Lincoln
    Washington
    Clinton
    Bush

    Table B
    Last_Name Category
    Lincoln A
    Washington B
    Clinton
    Bush



    I would like my query to return Clinton and Bush because they are not in Table B, but also Lincoln because it is category "A".

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    Hi there,
    see the union query qrySHOW_A_NOT_B_AND_B_CAT_A in the attached database.

    Cheers,
    Vlad
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 2
    Last Post: 08-10-2015, 02:24 PM
  2. Replies: 2
    Last Post: 09-20-2014, 11:28 AM
  3. Replies: 25
    Last Post: 08-06-2014, 04:08 PM
  4. Transpose specific records to table (VBA)
    By KP_SoCal in forum Programming
    Replies: 2
    Last Post: 02-27-2013, 09:31 PM
  5. Replies: 22
    Last Post: 04-25-2012, 10:03 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