If you're using a field as part of an expression in another control on the report, a
Null value in the field can cause errors.
An easy way to handle such errors is to force the field to Zero using a custom function if it contains a Null value. For example, I use the following function:
Function ErrorAvoid(n As Variant) As Variant
On Error GoTo Trap
ErrorAvoid = n
Exit Function
Trap:
ErrorAvoid = 0
Resume Next
Exit Function
End Function
Then use it in a calculated text boc
=(txtAnyField)+ErrorAvoid(Reports!RptName!SubRptName.Report!txtSubtotal)
|