Sum = Yes!

D

Dunner

Hi

I am attempting to create a report that gives the sum of
certain fields for certain groups of records however I am
running into some issues. The fields I am attempting to
Sum are Yes/No fields and all I really want to know is
how many are yes.

If I use the report wizard all the sum fields have a
value of "Yes" if one of the records has a yes value
however if I create the sumfield and calculation manually
it shows the sum of the fields that are checked as a
negative number.

Is there an easy way to get this done without manually
typing in the calculation for each field (there are about
30 I need to sum) in each report (about 10 or so)?

Any help would be greatly appreciated.

Thanks

Dunner
 
R

Roger Carlson

In Access the Yes value of a Yes/No field is actually stored as a -1. To
sum it, I would use the ABS function (absolute value)

=abs(sum(MyYesNoField))
 
D

Dunner

Can this be done using the report wizard or will I have
to type it in manually?

Thanks

Dunner
 
R

Roger Carlson

The wizard will usually create the Sum in a group footer. You'd have to add
the ABS function around it.
 
D

Dunner

Thanks Roger,

IT turns out that because the formatting of the fields I
am trying to sum was set to Yes/No the sum fields are
automatically set to that as well :-S. I've changed it
now so that I'm getting figures albeit minus ones. I'll
have to edit the fields to change them to positives but I
have a semi-working report now at least!

Thanks

Dunner
 
Top