IIF and Nz

Experts, I have a table with a field named [Completed].  This table is an import from Excel.  The field value is either Yes, No or "".    If [Completed] is null or "" then the return should be "No".  

What do you see as wrong in the below statement?  I seem to always get "Yes" for any value in  [Completed] whether it is Yes or "No" or ""

Completed_Group: IIf(Nz([Completed],""=""),"No","Yes")
pdvsaProject financeAsked:
Who is Participating?
 
als315Commented:
Try this code:
IIf(Nz([Completed],"") ="","No",[Completed])
0
 
Kelvin SparksCommented:
Try
IIf(Nz([Completed], """"), "No", "Yes")

You were trying to set to "No" any thing that was "=". Not sure where you got = from?

Kelvin
0
 
bonjour-autCommented:
this should work:
Completed_Group: IIf(Nz([Completed]=""),"No",[Completed])
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
bonjour-autCommented:
Explanation: Nz([Completed] will give "" in case the field is "" or Null
0
 
Rey Obrero (Capricorn1)Commented:
try

Completed_Group: IIf([Completed] & ""="","No", [Completed])

this will give you
No for Null
No for No
Yes for Yes
0
 
pdvsaProject financeAuthor Commented:
that was it.  thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.