You'll need two queries. Here's the SQL for the first one:
Code:
SELECT TOP 3 Count(tblMasterData.ID) AS CountOfID, tblMasterData.PartNumber, tblMasterData.NonConformance
FROM tblMasterData
GROUP BY tblMasterData.PartNumber, tblMasterData.NonConformance
HAVING (((tblMasterData.PartNumber)="11A"))
ORDER BY Count(tblMasterData.ID) DESC;
And here's the 2nd query which is what you would use for your report. Just replace the name Query1 with whatever you named your first query:
Code:
SELECT tblMasterData.*
FROM tblMasterData INNER JOIN Query1 ON (tblMasterData.NonConformance = Query1.NonConformance) AND (tblMasterData.PartNumber = Query1.PartNumber);
Be sure to read the link that June7 posted. It's got very good information on the subject.
Ron