locked
Compare two fields in Access is not working RRS feed

  • Question

  • User1997074450 posted

    I have two fields and they need to match.

    I have a written a iif([field1]=[field2],1,0) but this is returning records even though they are same as '0'.

    Monday, March 1, 2021 2:50 AM

Answers

  • User-1330468790 posted

    Hi vj78,

     

    but this is returning records even though they are same as '0'.

    Could you please specify the problem? 

    Is the function not working as expected?

    Or do you select unmatched values using this IIF function but it returns the records which are matching?

     

    It would be much helpful to target the problem if you could post more information.

    Best regards,

    Sean 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 1, 2021 8:10 AM

All replies

  • User-1330468790 posted

    Hi vj78,

     

    but this is returning records even though they are same as '0'.

    Could you please specify the problem? 

    Is the function not working as expected?

    Or do you select unmatched values using this IIF function but it returns the records which are matching?

     

    It would be much helpful to target the problem if you could post more information.

    Best regards,

    Sean 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 1, 2021 8:10 AM
  • User1997074450 posted

    I also did NOT know until I pasted records in excel. I have a join to capture the field2. 

    when the match is done and I paste the records in the excel. It brings in all the 4 values for field2. Its supposed to bring only 1 where the match is.

    So, the question now becomes different.

    My join is not working properly to get the field2 get all values from the table in excel but in access it displays the that record perfectly ok.

    Thanks, VJ

    Monday, March 1, 2021 12:58 PM