How do I count/total check boxes in a report?

N

Nick

I need help with the expression for getting a total of checked boxes in a
report. Can you do this? If yes, what should the expression look like?
Thanks.
 
D

Dirk Goldgar

Nick said:
I need help with the expression for getting a total of checked boxes
in a report. Can you do this? If yes, what should the expression
look like? Thanks.

If you're talking about a summary total of a particular check box, you
can use the handy fact that the value "True" (or "checked") for a
boolean (Yes/No) field is represented internally by -1, and "False" is
represented by 0. To get a the number of "True" values in a particular
field, then, you can use an expression like this:

=Abs(Sum([YourField]))
 
S

Sprinks

Hi, Nick.

Since Yes has a value of -1 and No has a value of 0, you can use:

=Abs(Sum([YourYesNoField]))

Hope that helps.
Sprinks
 
Top