converting text string to numeric
25 pts.
0
Q:
converting text string to numeric
I am using Access 2003. I have a table with numbers that are shown as text data. I want to convert from text
to numeric. Can this be done in a table or a query?
ASKED: Dec 23 2008  10:53 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
335 pts.
0
A:
 RATE THIS ANSWER
-2
Click to Vote:
  •   0
  •  -2
  • AddThis Social Bookmark Button
Dim MyValue
MyValue = Val("62") ' Returns 62.
MyValue = Val(" 8 67 3") ' Returns 8763.
MyValue = Val("15 and 30") ' Returns 15.
More information on the VAL function here
You could also try these functions:
CDbl
CInt
CCur
CDec
Good Luck!
-Flame

If you are wanting to permanently change them, open the table in design mode and change the datatype to number.
-Troy
Last Answered: Dec 24 2008  5:45 PM GMT by Tlsanders1   335 pts.
Latest Contributors: Flame   14495 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

SbElectric   1625 pts.  |   Dec 24 2008  7:27PM GMT

Good answer by Flame & Troy
Only caveat ….
the default numeric (I think) is Integer or Long Interger in Access 2003. So be sure to select Double if it has decimal.
And ofcourse - make a copy of the table before the conversion … it may give a message like data may be truncated etc…

SbElectric

 
0