Criteria not excluding data

  • Thread starter Thread starter Jennifer
  • Start date Start date
J

Jennifer

I have this expression set in a query and it works fine.

CorrectLOA: IIf([EndDate] Is Not Null And [EndReason]="LOA","1","")

But I want to set the criteria to exclude records that come back with 1. I
have tried to put in "Is Null" or "1" or 1 but it is not filtering those
records.

What can I set my criteria or should I change the expression.
 
That is because your IIF() statement is returning a string "1", not a numeric
1. Additionally, if the expression inside the IIF( ) statement is False,
then it returns an empty string "", not NULL.

So, your criteria should be:
Criteria: = ""

Or, you could just exclude this computed column and have a WHERE clause that
looks like:

WHERE [EndDate] IS NULL
OR [EndReason] <> "LOA"
 
Back
Top