Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! IF/AND function in Access Query 1

Status
Not open for further replies.

RDM23

Technical User
May 16, 2007
39
US
I am trying to write a formula in Access to evaluate 2 different parts and return Yes or No based on if both criteria is met. For example: If Field A is not equal to Field B, AND Field C = Null, then Yes, otherwise No.
Can someone let me know what the formula would look like? Thanks in advance.
 
SELECT Tablename.FieldA, Tablename.FieldB, Tablename.FieldC, IIf(([FieldA]<>[FieldB]) And IsNull([FieldC]),"Yes","No") AS test
FROM Tablename;

I hope/....
 
Iff (Field A <>Field B AND Field C is Null, True, False)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top