#error in null / 0 value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

I am having error when running the sum e.g. =Sum([A]) , the value of [A]
will be 0 or null. I tried: sum(Nz([A],0)) and Nz(sum([A]),0) , but both
still got error on it. can anyone give me a hand?


Thanks
Yolip
 
yolip said:
I am having error when running the sum e.g. =Sum([A]) , the value of [A]
will be 0 or null. I tried: sum(Nz([A],0)) and Nz(sum([A]),0) , but both
still got error on it. can anyone give me a hand?


You've leapt to the wrong conclusion ;-)

Sum is not bothered by either Null or 0. All of the
Aggregate functions ignore Null values and adding a 0 to
anything doesn't affect the result.

Most likely the problem is that your [A] is not a **field**
in the form's record source table/query. It's a common
mistake to use a **control** name instead of a field name.

If that's not the issue. post a Copy/Paste of the actual
expression that you're using along with an explanation of
where the terms are coming from.
 
If the value of [A] will be 0 or null, the sum will always be 0.

What does your error look like? Is the name of the control something other
than a field name?
 
Back
Top