converting text to number

ebiscaro

Registered User.
Local time
Today, 17:08
Joined
Apr 5, 2003
Messages
37
Hi,

I got some numbers stored as text in a query. I need to do some simple math on those number. How can I convert text to number automatically, without going into the table design?

Thank you
 
if they are valid numbers then Access will do maths on them even if they are stored as texts. Just don't try using comparators < > on them!

Peter
 
The Val() function is intended specifically for this situation.
It returns the specific numeric value of a string.
For example,
x = "21.6"
? val(x)
21.6

The cInt() functions works equally well, but returns
just the integer, rounded up or down.
x = 21.6
? cint(x)
22

x = 21.4
? cint(x)
21

Bob
 
Last edited:

Users who are viewing this thread

Back
Top Bottom