Return null (blank) instead of zero

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

Guest

I have written an expression using the IIF function. It evaluates two number
fields and performs a calculation. I would like to display null (blank) if
the expression returns a value of zero. Is this possible?
 
If you want it to display blank then you can use the control's format to set
that.

Set the format as follows
#;-#;"",""

If you want it to BE null then you need to do the calculation and test the
result and then either return Null or the value of the calculation
So if your original IIF is
IIF(A<>B,A*B,A)
Then it now becomes
IIF( IIF(A<>B,A*B,A)=0 ,Null, IIF(A<>B,A*B,A))

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top