Query - counting Yes in Yes/No field

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
 
A

Allen Browne

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")
 
T

tahir2676

-----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
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

calculating a percentage 1
counting yes/no fields 3
Access Dcount (multiple criteria) 3
Count Yes/No with Criteria 2
Yes/No Query 1
Counting up Yes/No fields in queries 3
query yes/no field 6
Counting a yes/no field 2

Top