Reporting total of Yes

L

Linda

Hi:

I am using Access XP. I would like to count the total
number of Yes's in one of my fields, but the field has
check marks in them. If I actually use the words Yes and
No, I can count them by using this Control Source...=SUM
(Abs(Attending]="YES")). How can I count them if I am
using check marks?

All Checked Out.
 
F

fredg

Hi:

I am using Access XP. I would like to count the total
number of Yes's in one of my fields, but the field has
check marks in them. If I actually use the words Yes and
No, I can count them by using this Control Source...=SUM
(Abs(Attending]="YES")). How can I count them if I am
using check marks?

All Checked Out.

=ABS(Sum([CheckBoxFieldName]))
 
A

Allen Browne

Regardless of how you display the field, Access uses -1 for True, and 0 for
False.

You can therefore use:
=Abs(Sum([Attending]))
This adds all the -1 values, and then drops the negative from the sum.
 
L

Linda

Thank You so very much! My report is now a beautiful
thing.
-----Original Message-----
Regardless of how you display the field, Access uses -1 for True, and 0 for
False.

You can therefore use:
=Abs(Sum([Attending]))
This adds all the -1 values, and then drops the negative from the sum.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I am using Access XP. I would like to count the total
number of Yes's in one of my fields, but the field has
check marks in them. If I actually use the words Yes and
No, I can count them by using this Control Source...=SUM
(Abs(Attending]="YES")). How can I count them if I am
using check marks?

All Checked Out.


.
 

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

Top