Tom Crowfoot
asked on
Convert Text to Number handling blanks
Hi
In an Access Query I need to convert text to a number - I've been using var([Field1]), but if the field was blank then it returns a zero, is there a way to convert the text to a number & if the field was blank then it remains blank?
Can anyone help?
In an Access Query I need to convert text to a number - I've been using var([Field1]), but if the field was blank then it returns a zero, is there a way to convert the text to a number & if the field was blank then it remains blank?
Can anyone help?
ASKER
Hi Thanks for that, unfortunately it keeps putting in a zero instead of leaving the result blank
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Brilliant, thank you that works well, but just as a side question & I'll open up a new request - any idea why if I link an excel spreadsheet to the database any query using val it doesn't appear in the list of queries
You can link a worksheet or a range from Excel, not a query.
ASKER
Ok cool thanks for that, really appreciated
You are welcome!
Open in new window
You can replace Null with whatever is appropriate for your situation.