how do i count "unchecked" boxes

  • Thread starter Thread starter lausch1973
  • Start date Start date
L

lausch1973

I have 2 checkbox fields, [E-Mail] and [Mail]. How do I count the records in
which neither of these fields is checked?
 
You can try an expression like:
=Sum(Abs( ([Mail] + [E-Mail]) = 0) )
A yes/no field evaluates to either true/-1 or false/0. This allows you to
compare with 0. The Abs() converts true/-1 to 1.
 
Hi,

Your question is somewhat vague. In your subject line you ask about
counting unchecked boxes. In your message you ask about counting records.

To count the check boxes, use Duane's method. Which from a brilliant
prior post by him can be simplified to:

select Sum(2+[E-Mail]+[Mail]) as Unchecked_Count
from tblYourTable;

To count the records where both the fields are not checked just do a
summary query with the condition of both have to be false.

select Count(*) as Record_Count
from tblYourTable
where [E-Mail] = False and [Mail] = False;

Clifford Bass
 
Hi,

Oops, misread Duane's response, which counts records--got lost in all
the parantheses!

Clifford Bass
 
Hi Duane,

Expanding on your idea from a while back, this can be simplified to:

=Sum(1+([Mail] Or [E-Mail]))

Which only uses one function call.

Clifford Bass
 
Back
Top