The problem is that Val([TextField]) is causing an error because at least one value in [TextField] cannot be converted by Val. It is likely that there is some text in it that cannot be converted to a number. Investigate the IsNumeric function which will tell you whether a value is a valid number before you call Val.
- Martin
SELECT *
FROM Table
WHERE [TextField] Not Is Null And Val([TextField]) > 0;
or:
SELECT *
FROM Table
WHERE Val([TextField] & "") > 0;
Testing for Val([TextField]) > "0" doesn't make sense as Val returns a number.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
"0"instead of0. - Arindam NayakVal([TextField])is causing an error because at least one value in[TextField]cannot be converted byVal. It is likely that there is some text in it that cannot be converted to a number. Investigate theIsNumericfunction which will tell you whether a value is a valid number before you callVal. - Martin