how can I have access total the number of yes's in a yes/no col.?

G

Guest

I have a report input that I need to pull from 4 different columns, each of
which will either have a yes or a no in the record. How can I total, say the
number of yes's in each of the columns?
 
A

Amy Blankenship

Open the query builder and show the table. Now, click on the sum button
(looks like a pointy E). Select all 4 columns from the table and drag them
down to the grid. Now select "Sum" in the totals row for each. The Sum
will actually be -1* the number of yesses. You can fix this by changing the
expression generated to Abs(Sum(MyField)) and the totals to Expression.

HTH;

Amy
 
M

Marshall Barton

Matt said:
I have a report input that I need to pull from 4 different columns, each of
which will either have a yes or a no in the record. How can I total, say the
number of yes's in each of the columns?


Not clear where you want to do the calculation, but try
using a report text box in a group or the report
header/footer section. The text box's control source
expression would be like:

=Sum(IIf(field = True, 1, 0))
 

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