Count & Yes/No fields

P

Peter

Hi, Help please !!!
I have a large database with a number of Yes/No fields. I
want count the Yes fields and have these numbers in the
data area in a pivot table - can this be done?
 
N

Niklas Östergren

Hi Peter!

You can make a select query where you select only fields with "Yes" and then
use DCount() to count number of records in that query.

// Niklas
 
G

Guest

Thanks, Niklas, I'll give it a try.
-----Original Message-----
Hi Peter!

You can make a select query where you select only fields with "Yes" and then
use DCount() to count number of records in that query.

// Niklas


"Peter" <[email protected]> skrev i meddelandet


.
 
D

Duane Hookom

To "Count" the Yes values of a Yes/No field, you sum its absolute value
Sum(Abs([YourField]))
To "Count" the No values of a Yes/No field, you sum its value + 1
Sum([YourField] +1)
 
P

Peter

Thanks Duane - works a treat!!
-----Original Message-----
To "Count" the Yes values of a Yes/No field, you sum its absolute value
Sum(Abs([YourField]))
To "Count" the No values of a Yes/No field, you sum its value + 1
Sum([YourField] +1)

--
Duane Hookom
MS Access MVP
--

Hi, Help please !!!
I have a large database with a number of Yes/No fields. I
want count the Yes fields and have these numbers in the
data area in a pivot table - can this be done?


.
 

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

counting yes/no fields 3
Counting up Yes/No fields in queries 3
Negative Number when Counting Yes/No 2
Counting Data In Columns 1
Count in query 2
Access Dcount (multiple criteria) 3
Sum(IIF statement 1
Checkbox qry into Report 2

Top