Error on sum

  • Thread starter Thread starter Kara
  • Start date Start date
K

Kara

This is a very basic question.

On the detail section I have a text box "InvesmentAmount"
with Control source InvesmentAmount

On the group footer section I have a text box "Sum Of
InvesmentAmount" with Control source =nz(Sum
([InvesmentAmount]),0)

On the Report footer section I have a text
box "InvesmentAmount Grand Total Sum" with Control source
=nz(Sum([InvesmentAmount]),0)

If there is no data, Error will be displayed for the group
footer section and for Report footer section.

I want to have a 0 if no data.

Thanks
Kara
 
Kara said:
On the detail section I have a text box "InvesmentAmount"
with Control source InvesmentAmount

On the group footer section I have a text box "Sum Of
InvesmentAmount" with Control source =nz(Sum
([InvesmentAmount]),0)

On the Report footer section I have a text
box "InvesmentAmount Grand Total Sum" with Control source
=nz(Sum([InvesmentAmount]),0)

If there is no data, Error will be displayed for the group
footer section and for Report footer section.

I want to have a 0 if no data.


Nz doesn't deal with non-existent data. Use this instead:

=IIf(Report.HasData, Sum([InvesmentAmount]), 0)
 
Back
Top