count if checked

  • Thread starter Thread starter Randal
  • Start date Start date
R

Randal

I have a couple dozen check boxes in a table that I need to count. I am
looking for a way to use a single query to display a count per field only
when that field is checked.
 
I think you may want to read the following article before you go any
further...

http://advisor.com/Article/clars05

Select Count(*) from table where CheckBoxFieldName

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Randal,

I'll assume that each of these checkboxes is in actuality a separate
column in your database (although this is normally bad data
structure).

SELECT Sum(Abs([chk1])) AS SumOfChk1, Sum(Abs([chk2])) AS SumOfChk2
FROM tbl_Checkboxes;



--
HTH

Dale Fye


I have a couple dozen check boxes in a table that I need to count. I
am
looking for a way to use a single query to display a count per field
only
when that field is checked.
 
Back
Top