I have a field returned from a query. This field will either be a number or
a string, the string will be a code that explains why there is no number. I
use a function to sort that out (see bottom of this post)
Now I have a number 94.8892254 in str
If I run FormatNumberIfNumeric(str) I get "95" I should get "95.00". How
do I fix this?
Thanks
MIke
Function FormatNumberIfNumeric(str)
If Isnumeric(str) then
FormatNumberIfNumeric = FormatNumber(str, 2, -1, 0, 0)
Else
If str = "" or ISNull(str) then
FormatNumberIfNumeric = "<b>???</b> "
Else
FormatNumberIfNumeric = str & "boo"
End If
End If
End Function