Converting text string to numeric

25 pts.
Tags:
Microsoft Access 2003
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?

Answer Wiki

Thanks. We'll let you know when a new response is added.
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

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SbElectric
    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
    2,540 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following