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 / Queries / May 2005

Tip: Looking for answers? Try searching our database.

How do I get the count of yes/no's in a query ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
new at this - 18 May 2005 23:07 GMT
My database collects a lot of Yes/No questions.  The query is date specific,
and it asks to find how many ESA tune-up were performed and of those a yes/no
field asks if the customer invested in an ESA renewal.  The query shows this
with no problem.  The problem I have is how can I show in this query how many
records in the database were queried to get this information.  
fredg - 19 May 2005 00:45 GMT
> My database collects a lot of Yes/No questions.  The query is date specific,
> and it asks to find how many ESA tune-up were performed and of those a yes/no
> field asks if the customer invested in an ESA renewal.  The query shows this
> with no problem.  The problem I have is how can I show in this query how many
> records in the database were queried to get this information.

You can take advantage of the fact that a check box has a value of
either -1 or 0.

To count Yes's:
CountOfYes:Abs(Sum([CheckBoxName]))

To count No's:
CountOfNo:Sum([CheckBoxName]+1)

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.