My table has several check boxes in it. In the query totals I have COUNT as my operator but it counts every record in my table, How do i get it to only count Boxes that are checked?
Every checkbox tends to have a value, so counting them basically gives you the number of records. If the checkbox is checked (True) the value is -1, whereas if the checkbox is empty (False) the value is 0. One way to count how many of the values is true is to SUM the checkbox field, then take the absolute value, or simply (-SUM(checkboxfield)). Make this the data source for the control in your report or form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.