Full Version: Yes/No Fields
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
cadyg
Help.
I need to count all the yes and all the No's in a yes/no field

Many thanks
Glen
freakazeud
Hi,
Since a Yes/No field's value can only be -1 or 0, all you need do is
add them. Use the sum and abs() function e.g.:

=Abs(Sum([YourField]))

If you wish to count No's, use:
=Sum([CheckBoxField]+1)

OR just a dcount() e.g.:

=DCount("[MyYNField]","MyTableName","[MyYNField] = True/False")

You might also find this article helpful!
HTH
Good luck
cadyg
It was a great help many thanks
freakazeud
You're welcome.
Good luck on future projects!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.