How to add a count in query for reports

M

Msloujon

I have this table where I will need two counts on the report. Both columns
are "PASS or FAIL" One I've named PassFail and the other is FinalPassFail now
What I want on my report is 'INITIAL PASS, INITITAL FAIL' and most of the
time thru the first testing they will "pass" and sometime we may have one or
two to "fail". I would like to know how many thru the first testing "pass" or
"fail". Then this boards go out get painted and return for testing a second
time to "pass" or "fail" so I need a count for 'FINAL PASS, FINAL FAIL'. How
can I write this in the query so that it will show in the report. This is
what I current have written =(Sum([CountPassFail])) in the report - CONTROL
SOURCE and now I have to ENTER PARAMETER VALUE when doing the report. Can
someone help this simple mind person? Thanks
 
J

John Spencer

First, what type of field is PassFail and FinalPassFail. If they are
yes/no fields then you can use the expressions

=Abs(Sum(PassFail)) for the number of passes
=Abs(Sum(FinalPassFail)) for the number of final passes

=Count(PassFail) - Abs(Sum(PassFail)) for the number of fails

The number of final Pass fails can be a bit more complicated since I
assume if the InitialPassFail is a pass you don't want to count the
fails for final fail.

=Count(PassFail)-Abs(Sum(PassFail))-Abs(Sum(FinalPassFail))

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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