Summing like fields in queries or tables

  • Thread starter Thread starter Wesley
  • Start date Start date
W

Wesley

Hi,

Is it possible to sum like fields in multiple tables or
queries?

I've tried using the query biulder but returned blank
results if same fields in any of the tables/queries have
blank records or null values.

I've searched KnowledgeBase and help but still can't find
any helpful information.

Thanks
 
-----Original Message-----
Hi,

Is it possible to sum like fields in multiple tables or
queries?

I've tried using the query biulder but returned blank
results if same fields in any of the tables/queries have
blank records or null values.

I've searched KnowledgeBase and help but still can't find
any helpful information.

Thanks
.
yes, you can sum like fields in queries, or in forms or
reports using calculated controls.
the catch is, if any record in the dynaset has a null
value in the field you're running the sum function on, the
function won't run - or won't sum ALL the records.
i usually get around this problem from the get-go, by
setting the default value of number fields in my tables to
zero - at least on the field(s) i know i'll have to sum
elsewhere in the database.
another way around it is to set a calculated field in the
query, as:

Sum(Nz(NumField,0))
 
Back
Top