Return blank if 0

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

Guest

How would one make a calculated field in a query display a blank when the
result = 0?
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top