iif statement w/null value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm tryin to run an if statement that looks like this:

IIf([ColorGroup]=Null,"NA",[ColorGroup])

The NA is not returning, the blank fields are still blank. What am I doing
wrong?
 
THANKS!!!

rico said:
This usually works better:

IIf(IsNull([Colourgroup]),"NA",[Colourgroup])

HTH

Rico

GOL said:
I'm tryin to run an if statement that looks like this:

IIf([ColorGroup]=Null,"NA",[ColorGroup])

The NA is not returning, the blank fields are still blank. What am I doing
wrong?
 
I'm tryin to run an if statement that looks like this:

IIf([ColorGroup]=Null,"NA",[ColorGroup])

The NA is not returning, the blank fields are still blank. What am I doing
wrong?

Nothing is equal to NULL, or for that matter *unequal* to NULL. Use
the NZ() function instead:

NZ([ColorGroup], "NA")

John W. Vinson[MVP]
 
Back
Top