Hi,
We don't have the layout of your original data. Is it like:
ProductNumber, DateTimeStampOfTheTest, TrueIfPassFalseIfFail '
fields
name
if so, then
===============
SELECT ProductNumber,
-SUM(-TrueIfPassFalseIfFail) AS numberPassed,
COUNT(*)+SUM(-TrueIfPassFalseIfFail) AS numberFailled
FROM myTable
GROUP BY ProductNumber
================
should do.
Hoping it may help,
Vanderghast, Access MVP
I have a table of different products inspected on a pass or fail basis
recorded by product line and lot # with associated quantities. The
lots
are
able to be reworked, so a product may have multiple entries, before
being
released to a customer.
I am able to use the totals row to group the product #'s and I can
see
where
there are multiple entries for various rework and inspection
activities.
My boss wants to see how many pass or fails records are owned by a
product
#, regardless of lot, and I am having a real headache trying to
populate a
query with a new nump(number passed) and numf (number failed). I
have
been
able to use 'dcount' to get all the records counted, and another
Access
help
site got me the count for failed, but nor for pass AND failed
records. My
attempts at trying to be tricky and just subtract one from the other
were
spotty at best(got some erroneous results I still need to
doublecheck, and
my
boss has been telling me that he could've counted the records by hand
for
as
long as I have been working on the problem. I also tried the
'counta'
function,since it sounded like it would count text lines, but I got
an
error
from the QBE grid, saying that Access 2003 did not recognize the
'counta'
function. This should be pretty simple, no? Or am I overlooking
something
really simple.
:
No idea what your underlying data structure looks like, so I could
only
guess at a good way to query it...
More info, please...
Jeff Boyce
Microsoft Office/Access MVP
I am taking over a database for production. The manager wants to
see
from
a
QA table the counts of product that have a "pass" of "fail"
attached to
its
inspection. I found a "counta" function in the microsoft support
pages,
but
the QBE form does not recognize this function. Should I try
dcount to
look
at the table and then count pass/fail per productline? Thanks.