>In a report I have an average field called AveQuan, which averages this expression:
>
>
>ProdsHis.PHUnits + ProdsHis.SMUnits - ProdsHis.LMUnits
>
>
>The expression is reset when ProdCode changes. Is it possible to code this somehow in a query?
SELECT ProdCode, AVG(PHUnits + SMUnits - LMUnits) AS AveQuan
FROM ProdsHis
GROUP BY ProdCode
not tested
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.