Showing Zero's on a report

  • Thread starter Thread starter Kay Starnes
  • Start date Start date
K

Kay Starnes

Can anyone help me make my report show zero's in a number field on my report?
The table's field is blank therefore the Q returns a blank field.
 
"Blank" = null which means no number has been entered.
Zero = the field has a specific value.

So printing a zero for a field which is null is technically wrong. But.....

If you are considering an untouched field to be a "0" set 0 as the default
value for that field.
 
Hi Kay,

You could set the control's format to something like:

#,##0;-#,##0;;0

Clifford Bass
 
Kay

Use
=IIf(IsNull([YourField]),"0",[YourField])
as the controls "control source"

use "0" if you want 0 returned or you can put words too like "No Data Entered"

Good luck
Barry
 
Might need saying, if using Barry's method to change the control name if it's
the same as the field name.
 
I would actually use Clifford's suggestion since it doesn't involve changing
the Control Source.

However, I would change:
=IIf(IsNull([YourField]),"0",[YourField])
to
=IIf(IsNull([YourField]),0,[YourField])
I try to keep the proper data type and "0" is a string which doesn't make
sense.

You could also use the simpler:
=Nz([YourField],0)
or
=Val(Nz([YourField],0))
 
Back
Top