B
Brook
HI all,
i'm trying to declare this function to create the following calculation
within a report:
=sum(nulltozero(amount))
Thanks in advance..
Brook
Public Function NullToZero( TheValue as Variant)
'This function converts Null to Zero
'It also converts Non Existing Data to Zero
On Error Goto NullToZero_Err
If ISNull(TheValue) then
NullToZero = 0
Else
NullToZero = TheValue
End if
Exit Function
NullToZero_Err:
'This function would only generate an error
'if the data in TheValue doesn't exist at all.
NullToZero = 0
Exit Function
End Function
i'm trying to declare this function to create the following calculation
within a report:
=sum(nulltozero(amount))
Thanks in advance..
Brook
Public Function NullToZero( TheValue as Variant)
'This function converts Null to Zero
'It also converts Non Existing Data to Zero
On Error Goto NullToZero_Err
If ISNull(TheValue) then
NullToZero = 0
Else
NullToZero = TheValue
End if
Exit Function
NullToZero_Err:
'This function would only generate an error
'if the data in TheValue doesn't exist at all.
NullToZero = 0
Exit Function
End Function