IIF Function in query

F

Fred's

Hello all,

I have a table which I have the default value 0, If these a way to use
the function "IIF" in query to keep the cell blank when the cell
contain a 0 as the default value? Because, if there is no quanity
entered, I don't want to see the default value in my report

Thanking you for your help!
Fred's
 
D

Douglas J. Steele

That sort of begs the question "Why have a default value if you don't want
it?"

IIf([Field] = 0, Null, [Field])

To remove the unwanted 0s, you can write an Update query:

UPDATE MyTable
SET MyField = Null
WHERE MyField = 0

Of course, what happens if some of the fields should have 0 as their value?
 
Top