Counting Checkboxes in True Condition

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like my report to count or sum all checkboxes that are checked
(True). What would be the syntax?
 
I am assuming you are refering to a Yes/No field in Access.
You just sum the column in the query behind your report. To do this right
click on the query where the fields are listed and check totals if not
already showing. Then on the Yes/No(true/false) field in the row for totals
pick sum. It will add -1 for every true record, unless you make an iif
statement and set all the true values to one.

iif(yesnobox = true, 1,0)

This will add one for all the true values and 0 for the false values.

Or a third option is to set your own values using a statement simliar to the
one above.
 
I would like my report to count or sum all checkboxes that are checked
(True). What would be the syntax?

Add an unbound control to the report.
Set it's Control Source to:
=Abs(Sum([CheckBoxName]))
 
Back
Top