Forum Discussion
wyptaj
Feb 02, 2022Copper Contributor
Convert Text to a number and 0 instead of #error
Hello Everyone, I'm sure this is an easy thing for all you experts, but I'm having a bit of trouble with this. I have a linked sql table in access, whereby numbers have been stored as text for ...
Feb 02, 2022
Hi,
How about this?
IIf(IsNumeric(bk_profit),Val(bk_profit),0)
Servus
Karl
************
Access News
Access DevCon
arnel_gp
Feb 02, 2022Iron Contributor
review again the requirement.
you don't need 3 functions just to return a number or 0 (if not number).
you don't need 3 functions just to return a number or 0 (if not number).
- Feb 02, 2022
Hi Arnel,
I reviewed the requirement and keep interpreting "where there isn't a number" as where there is an empty field or potentially alphanumeric text like "123xyz" where your short version would not return 0.
Of course, this is my interpretation, but it is allowed as long as the requirements are not specified in more detail.
Servus
Karl
************
Access News
Access DevCon