iif statement w/null value

G

GOL

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?
 
G

GOL

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?
 
J

John Vinson

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]
 
Top