No, in a SUM, and in VBA-DSUM( ... ), the nulls are logically removed
before the aggregate occurs. In fact, the null are always (logically)
automatically removed for any aggregate EXCEPT for COUNT(*) since *
indicates a record, not a value from a particular field.
Vanderghast, Access MVP
Jasper Recto said:
So are you saying that if I have a table that has cost information and I
plan on doing any sumation on any fields I have to check for null values
on all my queries?
Thanks!
Jasper
KARL DEWEY said:
I do not know about in DSum - try it.
Yes in a Sum query.
--
KARL DEWEY
Build a little - Test a little
:
Does that hold true for when its in a DSum equation or if you Do a Sum
query?
Null plus a value equals Null.
Use the Nz function like this --
Expr1: Nz([Field1], 0) + Nz([Field2], 0)Nz([Field3], 0)
This changes the nulls to zero and that value can be used in math
unless
you
try to divide by it.
--
KARL DEWEY
Build a little - Test a little
:
I have a query that has a column that adds the records from each
previous
column.
However, if one of those columns is blank, than the total is blank.
Why does that happen?
Thanks,
Jasper