Sum and Nz

  • Thread starter Thread starter Ilan
  • Start date Start date
I

Ilan

Hi,
I want to get a sum of a column, but if there is no data
in the column i would like to print out a zero. Now, i
understand that there is a built in function Nz in
Access, but could i use it in my report?

Thanks,
Ilan
 
Ilan said:
I want to get a sum of a column, but if there is no data
in the column i would like to print out a zero. Now, i
understand that there is a built in function Nz in
Access, but could i use it in my report?


Sure, the expression would be:

=NZ(Sum(columnname))

Or, you can leave it as you have it and set the text box's
Format property to display 0 instead of nothing when the sum
is Null. For integer values the format could be as simple
as:
0;;;\0
 
Back
Top