Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2004

Tip: Looking for answers? Try searching our database.

Counting Checkboxes in True Condition

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kitti - 12 Oct 2004 15:09 GMT
I would like my report to count or sum all checkboxes that are checked
(True). What would be the syntax?
Tamiyra - 12 Oct 2004 15:35 GMT
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?
fredg - 12 Oct 2004 15:41 GMT
> 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]))
Signature

Fred
Please only reply to this newsgroup.
I do not reply to personal email.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.