Return blank if 0

  • Thread starter Thread starter Guest
  • Start date Start date
How would one make a calculated field in a query display a blank when the
result = 0?

Two ways:

IIf([result] = 0, "", [Result])

or set the Format property of the control in which you're displaying this (you
shouldn't be displaying a query datasheet) to a "four value format" - four
formats separated by semicolons, for positive, negative, zero or NULL values
respectively:

"#";"-#";"";""

to show 34, -32, blank or blank respectively.

John W. Vinson [MVP]
 
Back
Top