DavidW said:
Learned Something Today
How do you get zero values out of a query?
Just set the field's Criteria to <>0 to prevent the report
from seeing records where that field has a value of 0 or
Null (since Null compared to anything is never True). You
can filter out just the records where a field is Null by
using a criteria of Is Not Null
In general, the criteria used in the Access query design
grid is restructured into an SQL statemet's Where clause
(which is an extremely powerful and necessary capability in
dealing with any SQL compatible database system).
I am using calculated fields to sum a group of fields with the following
=sum(nz(firstfield,0))+sum(nz(secondfield,0))
That's redundent, but harmless, as long as you want the
report to display the records where firstfield or
secondfield is Null. Note that the aggregate functions
(Count, Sum, Avg, etc) all ignore Nulls, so the Sum you're
using would have the same result as just using
=Sum(firstfield)+Sum(secondfield)
there are some null records in different fields, is there a different way to
handle nulls that I havent learned about yet?
See above.