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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top