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_gpFeb 02, 2022Iron Contributorreview again the requirement.
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
- wyptajFeb 02, 2022Copper ContributorThank you both for your help, I really do appreciate it and they both worked. Thank you so much