By default, DAvg does not take into account NULL values. If you run it on a field that contains NULLS, it skews the result. This function solves that issue:
Code:Function EAvg(strFld As String, strTbl As String, Optional strCriteria As String) Dim lngRecs As Long 'TOTAL RECORDS WITH NULLS Dim lngSum As Long 'SUM OF THE FIELD VALUES lngRecs = DCount("*", strTbl) lngSum = DSum(strFld, strTbl) EAvg = lngSum / lngRecs End Function