counting multiple fields

  • Thread starter Thread starter Janna
  • Start date Start date
J

Janna

I would like a to have a query provide a count for
multiple fields. For example, I have a table with fields
titled SS, CU, NH. Using the count feature in the query
in design view, I can get a record count for each field,
but how do I go about adding them together to get a total
count for all records in all three fields? Thanks much!
 
Janna said:
I would like a to have a query provide a count for
multiple fields. For example, I have a table with fields
titled SS, CU, NH. Using the count feature in the query
in design view, I can get a record count for each field,
but how do I go about adding them together to get a total
count for all records in all three fields? Thanks much!

I'm not sure just what you want. The COUNT operator doesn't count fields, or
values - it counts *records* in the table. If each record in the table has
fields named SS, CU and NH, what exactly are you counting? What are the
values in these fields, and what constitutes a "hit" which you want counted?

John W. Vinson/MVP
 
The value in the field is either "X" or blank. I would
like to obtain a count on the total number of records
that contain "X"

Thanks.
 
Field: CountSS: Abs(Sum([SS]="X"))

This means that you will need to use a Totals query.

Do you know how to do that?
 
Yep. Thanks!
-----Original Message-----

Field: CountSS: Abs(Sum([SS]="X"))

This means that you will need to use a Totals query.

Do you know how to do that?

The value in the field is either "X" or blank. I would
like to obtain a count on the total number of records
that contain "X"

Thanks.
.
 
Back
Top