Reporting total of Yes

  • Thread starter Thread starter Linda
  • Start date Start date
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.
 
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]))
 
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.
 
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.


.
 
Back
Top