Results 1 to 10 of 10
  1. #1
    Svenne is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2022
    Posts
    10

    Tables with same information

    Dear listmembers,

    Assume the following: I have four tables with names of people. Some of the people that appears in table 1 also appear in the other tables. Is it possible to get a list with the names of the people that ONLY appear in table 1 but not in the other tables?

    Best,


    Svenne

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    try "unmatched query" wizard
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    To add to Micron's answer, I think the best approach would be to create a new union query on the table 2,3 and 4 to create a unique list of names that exists inthose three queries then create the unmatched query suggested between table 1 and the union query.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    232
    In theory that is not too difficult.
    Code:
    SELECT * FROM T1 WHERE
    Key NOT IN (SELECT Key FROM T2) AND
    Key NOT IN (SELECT Key FROM T3) AND
    Key NOT IN (SELECT Key FROM T4)
    But............
    Why do you store the same data In 4 tables?
    How do you know it is the same person?

  5. #5
    Svenne is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2022
    Posts
    10
    Many thanks to all of you for your reply. Much appreciated. Just one more thing. Could you give a step-to-step instruction how to do this? Remember, I am a novice. :-)

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Svenne,
    Remember, I am a novice.
    Please provide some info re xps35's questions. We need some context.

    Why do you store the same data In 4 tables?
    How do you know it is the same person?

  7. #7
    Svenne is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2022
    Posts
    10
    Dear xps 35. With a lot of help from another forum member this worked just great. Thank you so much.

    All my best,
    Svenne

    Quote Originally Posted by xps35 View Post
    In theory that is not too difficult.
    Code:
    SELECT * FROM T1 WHERE
    Key NOT IN (SELECT Key FROM T2) AND
    Key NOT IN (SELECT Key FROM T3) AND
    Key NOT IN (SELECT Key FROM T4)
    But............
    Why do you store the same data In 4 tables?
    How do you know it is the same person?

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Svenne,
    Glad you have a working solution.
    For the benefit of anyone reading this thread who is experiencing a similar situation.
    could you give back a little and address the 2 questions that xps35 posed?

  9. #9
    Svenne is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2022
    Posts
    10
    Quote Originally Posted by orange View Post
    Svenne,
    Glad you have a working solution.
    For the benefit of anyone reading this thread who is experiencing a similar situation.
    could you give back a little and address the 2 questions that xps35 posed?
    I am sorry I didn't notice the questions earlier. It is a completely fictive thing. I was just curious if it was possible to have this kind of list. The names are completely made up by myself.

    Once again, many thanks.

  10. #10
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Not the data, the logic.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Information not transferring between tables
    By Grahamiwa in forum Access
    Replies: 3
    Last Post: 11-03-2019, 09:19 AM
  2. Replies: 5
    Last Post: 09-10-2015, 11:03 AM
  3. Form Information from multiple tables.
    By Homegrownandy in forum Access
    Replies: 1
    Last Post: 08-27-2015, 05:20 AM
  4. Replies: 3
    Last Post: 07-24-2015, 06:39 AM
  5. Updating information in the tables
    By jamilian in forum Database Design
    Replies: 1
    Last Post: 02-17-2010, 08:46 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