I have the following IF statement.
If FinanceCharge > 0 OR IsNull(FinanceCharge) = False Then
Process the FinanceCharge
End If
The desired result is to process the finance charge only if there is a non-zero value in it. This works fine if the finance charge is null, but if it is 0, the IsNull(FinanceCharge) is false which means that the IsNull portion evaluates to true and the 0 is processed.
Simply removing the IsNull() portion of the IF statment seems to correct the problem. However this is a very complex program written by someone who, obviously, knew what they were doing (they must have had a bit of brain stutter here), so I'm wondering what the purpose of the IsNull portion could have been. Does anyone have any ideas about why this might have to check for nulls?
If FinanceCharge > 0 OR IsNull(FinanceCharge) = False Then
Process the FinanceCharge
End If
The desired result is to process the finance charge only if there is a non-zero value in it. This works fine if the finance charge is null, but if it is 0, the IsNull(FinanceCharge) is false which means that the IsNull portion evaluates to true and the 0 is processed.
Simply removing the IsNull() portion of the IF statment seems to correct the problem. However this is a very complex program written by someone who, obviously, knew what they were doing (they must have had a bit of brain stutter here), so I'm wondering what the purpose of the IsNull portion could have been. Does anyone have any ideas about why this might have to check for nulls?