Query - counting Yes in Yes/No field

  • Thread starter Thread starter Carolyn
  • Start date Start date
C

Carolyn

This is a novice question I'm sure, but can anyone help?

I'm trying to count the number of 'yes' in a yes/no field.
Am using the 'count' function in query.

many thanks

Carolyn
 
Access stores Yes as -1, and No as 0. You can therefore sum the values to
get the number of yeses.

On a form or report:
=Abs(Sum([MyYesNoField])))

In other contexts:
=DSum("MyYesNoField], "MyTable")
 
-----Original Message-----
This is a novice question I'm sure, but can anyone help?

I'm trying to count the number of 'yes' in a yes/no field.
Am using the 'count' function in query.

many thanks

Carolyn
.
 
Back
Top