If you are refering to averaging the total of 5 fields, the Avg function built in to Access will not help you. You can Sum each field the use the following function to average across the 5 fields:
Public Function AverageOf5(n1 As Double, n2 As Double, _
n3 As Double, n4 As Double, n5 As Double)
Dim x As Integer
Dim z As Double
x = 0
z = n1 + n2 + n3 + n4 + n5
If z = 0 Then
AverageOf5 = 0
Exit Function
End If
If n1 <> 0 Then
x = x + 1
End If
If n2 <> 0 Then
x = x + 1
End If
If n3 <> 0 Then
x = x + 1
End If
If n4 <> 0 Then
x = x + 1
End If
If n5 <> 0 Then
x = x + 1
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.