How do i count "selected" check boxes in a report?

K

KIM

When I enter the expression =count(*) or the field name..it counts each
record instead of counting just the records where the check boxes are
selected. I can't figure out how to acheive this. PLEASE HELP
 
J

John Spencer

= Abs(Sum([The Field]))

Count will count the presence of any value. Yes/No fields are always True
(-1) or False(0). Adding up the values will give you a negative total of
the trues, so apply the Abs function to strip of the negative sign.
 
K

KIM

Thank you for sharing that-I have been going crazy for awhile on this and
someone had even told me I need to redo my tables b/c it would be easier to
put it in a query..this is exactly what I was looking for and I knew Access
had a function that was capable of calculating this..Thanks!

John Spencer said:
= Abs(Sum([The Field]))

Count will count the presence of any value. Yes/No fields are always True
(-1) or False(0). Adding up the values will give you a negative total of
the trues, so apply the Abs function to strip of the negative sign.

KIM said:
When I enter the expression =count(*) or the field name..it counts each
record instead of counting just the records where the check boxes are
selected. I can't figure out how to acheive this. PLEASE HELP
 

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