Results 1 to 4 of 4
  1. #1
    ATTHECROSS is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    14

    How to determine if two similar fields match from two separate tables in a single query

    Hello -

    I am trying to get a "True" "False" output from running an exact match on two similar fields from two different tables. I have the two fields side by side in a single query with a third field that is established to return the values of "True" or "False" if they match/don't match.



    I need help knowing how to do this in an Access query. In Excel I just use an exact match formula.

    Thanks for the help

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Are your two tables joined in a one-to-one relationship?

    If so, then you should just be able to create a Calculated field like this:
    Code:
    Check: IIF([Table1].[Field1]=[Table2].[Field1],True,False)

  3. #3
    ATTHECROSS is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    14
    JoeM -

    Thanks for the help! That worked great! The only tweek I had to do was to add quotes around the "True" and "False".

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Thanks for the help! That worked great! The only tweek I had to do was to add quotes around the "True" and "False".
    You are welcome!

    Note that when you place double-quotes around "True" and "False", that returns text values.
    If you leave them off, it will return boolean values.

    Choose whichever one is appropriate (note that if you were working with a Boolean "Yes/No", "True/False", or CheckBox field, you would use Boolean values, not text).
    However, if you are just returning a value to a screen in a query, it probably doesn't matter.

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

Similar Threads

  1. Replies: 11
    Last Post: 12-28-2017, 04:04 PM
  2. Replies: 4
    Last Post: 07-27-2016, 10:44 AM
  3. Replies: 4
    Last Post: 07-18-2016, 12:59 PM
  4. Replies: 7
    Last Post: 06-19-2014, 12:00 PM
  5. Replies: 1
    Last Post: 07-07-2009, 01:00 PM

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