My query is actually more involved than I originally stated. I did not want to complicate the question with possible erroneous information. Anyway here is the Totals SQL:
SELECT dbo_HistoryAll.PartNo, Year([TranDate]) AS Yr, Count(dbo_HistoryAll.Qty) AS CountOfQty, Avg(dbo_HistoryAll.TranAmt) AS AvgOfTranAmt
FROM dbo_HistoryAll
WHERE (((dbo_HistoryAll.DocType)="fr") AND ((dbo_HistoryAll.CurAssn)="ac"))
GROUP BY dbo_HistoryAll.PartNo, Year([TranDate])
HAVING (((dbo_HistoryAll.PartNo)="ag44a") AND ((Year([TranDate]))=2004) AND ((Avg(dbo_HistoryAll.TranAmt))>0));
Here is the Select SQL:
SELECT dbo_HistoryAll.PartNo, Year([TranDate]) AS Yr, dbo_HistoryAll.Qty, dbo_HistoryAll.TranAmt
FROM dbo_HistoryAll
WHERE (((dbo_HistoryAll.PartNo)="ag44a") AND ((Year([TranDate]))=2004) AND ((dbo_HistoryAll.TranAmt)>0) AND ((dbo_HistoryAll.DocType)="fr") AND ((dbo_HistoryAll.CurAssn)="ac"));
Thanks