I've solved the problem by adding the following if statement around the problem code:
If strTax <> 0 Then
If Len(strTax) > 2 Then
strTax = Left(strTax, Len(strTax) - 2) & "." & Right(strTax, 2)
End If
If Len(strTax) > 6 Then
strTax = Left(strTax, Len(strTax) - 6) & "," & Right(strTax, 6)
End If
End If
strTax = FormatCurrency(strTax)
The original code couldn't handle a zero value, so this solved the problem. Thanks anyway.:)
KWilliams
|