sum of yes/no field

G

Guest

Hello all

I was wondering if there's a way to make a calculated query that would give me the sum of how many check boxes are in a certain field. i know i could just use a sort to filter out all that are unchecked. but i was wondering if there is a way for access to make another field displaying the sum of the checked field SO I CAN PUT IT IN A REPORT.
 
J

Jim/Chris

Try =Abs(Sum([FieldName]))

Jim
-----Original Message-----
Hello all,

I was wondering if there's a way to make a calculated
query that would give me the sum of how many check boxes
are in a certain field. i know i could just use a sort to
filter out all that are unchecked. but i was wondering if
there is a way for access to make another field displaying
the sum of the checked field SO I CAN PUT IT IN A REPORT.
 
F

fredg

ok, not to sound slow or anything. but where exactly would i put that?

It's always best to include the relevant portion of any previous post
so that a potential replier doesn't have to go back and fish it out.
Some one reading this without having seen the previous messages would
have no idea what you are asking about.

Well, your original post says you want to put it in a query so you can
use it in a report.
Add a new column to the query.
CountOfFieldYes:Abs(Sum([Checkboxfieldname]))

In the report you would use [CountOfFieldYes] as a field.

You could also forget about the query and simply set an unbound
control's control source in the report to:
=Abs(Sum(CheckBoxFieldName]))
 

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

Top