Want total to be Zero rather than #Error

  • Thread starter Thread starter Karl Dewey
  • Start date Start date
This won't work. You need to use the HasData property of the report
=IIf([HasData],Sum([YourExpression]),0)

--
Duane Hookom
Microsoft Access MVP


Karl Dewey said:
Use an IIF statement --
IIF([MyData] Is Null,0, [MyData])
-----Original Message-----
Hi,

I created a form that runs reports on product sales by
customers. It lists the products purchased and in the
Report Footer at the bottom, it sums the amounts listed in
the detail section. The problem is that some customers
have no product sales. When the report is run, you get an
ugly looking #Error which I would rather the user not
see. It would be better if it read $0 or blank. Is there
are way to change this?

Thanks,

Chuck
.
 
Karl,

Thanks for your help with my question. I must have done
this incorrectly though. Before, I had Sum([ServiceAmt2])
which has giving me the #Error. I typed in the following
statement into the Control Source of the Data tab under
properties. But I am still getting the #Error message.

=IIf(Sum([ServiceAmt2]) Is Null,0,(Sum([ServiceAmt2])))

Thanks,

Chuck

-----Original Message-----
Use an IIF statement --
IIF([MyData] Is Null,0, [MyData])
-----Original Message-----
Hi,

I created a form that runs reports on product sales by
customers. It lists the products purchased and in the
Report Footer at the bottom, it sums the amounts listed in
the detail section. The problem is that some customers
have no product sales. When the report is run, you get an
ugly looking #Error which I would rather the user not
see. It would be better if it read $0 or blank. Is there
are way to change this?

Thanks,

Chuck
.
.
 
Back
Top