Yes/No

  • Thread starter Thread starter Ray Hogan
  • Start date Start date
In a query, include the Yes/No field. Change the query to a totals query by
clicking on the Sigma (looks like E) button on the toolbar at the top of the
screen. Go down to the Yes/No field in the query and change Group By to
Count. Run the query to get the count of Yeses and Noes.

For a table, use DCount function. Put the following expression in the
controlsource of a textbox:
=DCount("*","NameOfTable",""[NameOfYesNoField] = True) 'Count of Yeses
=DCount("*","NameOfTable",""[NameOfYesNoField] = False) 'Count of Noes

In a form based on a query, use DCount function. Put the following
expression in the controlsource of a textbox:
=DCount("*","NameOfQuery",""[NameOfYesNoField] = True) 'Count of Yeses
=DCount("*","NameOfQuery",""[NameOfYesNoField] = False) 'Count of Noes
 
Hi,
Please advise how best to count Yes/No data.
Regards.
Rayh

The easiest ways to do this are:

Yes:
=Abs(Sum([CheckBoxName]))

No:
=Sum(IIf([CheckBoxName] = 0,1,0))
or
No:
=Sum([CheckBoxName]+1)
 
Back
Top