Thanks MichaelRed. Here's what I did. Inserted your code in a module.
Code:
Public Function basSum(ParamArray varMyVals()) As Variant
'Michael Red 3/7/2002
'To return the SUM of a series of values
'Sample Usage:
'? bassum(1, 2.0067, 3)
'6.0067
Dim Idx As Integer
Dim MySum As Variant
For Idx = 0 To UBound(varMyVals())
If (IsMissing(varMyVals(Idx))) Then
GoTo NextVal
End If
If (IsNumeric(varMyVals(Idx))) Then
MySum = MySum + varMyVals(Idx)
End If
NextVal:
Next Idx
basSum = MySum
End Function
Next in a query I added:
TOT: basSum([cal1],[cal2],[cal3],[cal4],[cal5],[cal6],[cal7],[cal8],[cal9],[cal10],[cal11],[cal12],[cal13],[cal14],[cal15)
This produces the desired results. However, I would like to know if this is the most efficient way to write the syntax in the query i.e. cal1,cal2,cal3,.....cal15.
Since there are other numeric fields in the record,I didn't use your other code basRowSum which will sum and include ANY and ALL numeric fields, including "Date", "Currency", etc. I only want to sum the above group of fields.
Thanks I appreciate the help.