My program, NCR (Non-Conformity Report), keeps track of problems with
items that are received from vendors.  I am creating a report where the
user can retrieve a list of vendors that have had a NCR written against
them a certain number of times.  For example, if the user wants to see
what vendors have had more than 2 NCR's written against them.  
 
I need something like this, but it doesn't work.  It gives me an error
saying invalid use of group function.  So I put Count(Subs.Vendor) > 2
into a HAVING clause and it return only one vendor.  I know there are
more.
 
SELECT Subs.Vendor
FROM tblNCRLog INNER JOIN Subs ON tblNCRLog.SubID = Subs.SubNo 
WHERE ((tblNCRLog.CurrentDate > '2002/10/1') AND Count(Subs.Vendor) >
2);
        
 
Does someone have any suggestions?
 
Jacque

Reply via email to