Use this code:
And in the formfield use:
The added NZ() function will take care of Null (empty) fields.
Nic;o)
Code:
Function fncMultiplier(ByVal lngI As Long) As Long
If lngI = 0 Then
fncMultiplier = 0
Exit Function
End If
fncMultiplier = 1
While lngI > 500
fncMultiplier = fncMultiplier + 1
lngI = lngI - 500
Wend
End Function
Code:
=B1 * fncMultiplier (NZ(A1))
Nic;o)
Comment