Convert nulls to zero in report

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I want to convert a NULL field to zero in my report.

The report's record source is a query that uses an aggregate (e.g., SELECT
part, SUM(Amount)...).

When I set the control source of the textbox in the report to [Amount}, it
displays fine but will be balnk if Amount is null.

However, if I set the control source to this:

IIf(IsNull([amount])," ",[amount])

I get #error. I also get #error if I set it to =Amount.

How do I replace the Nulls with zero? And why can't I use an expression in
my control source?
 
" " is not the same as 0. Use IIf(IsNull([amount]), 0,[amount]), or
Nz([amount], 0)
 
Back
Top