You can use the Val function in conjunction with the Replace function. Here
is an example from the Immediate Window:
?Val (Replace("1,234.567 xx",",",""))
1234.567
The Replace function is needed to remove the comma, since the Val function
recognizes only the period (.) as a valid decimal separator.
In a SELECT query, you can use the following in the Field expression:
NumericPart: Val(Replace([TextField],",",""))
where [TextField] is the name of the field that contains your imported text
data. Make the appropriate substitution in the name of the field. You can use
this in the Update To: row of an Update Query:
Val(Replace([TextField],",",""))
Make sure that the numeric field that you are updating is defined as a
Single. If it is the default Long Integer, you will only get the integer
portion (1234) of the string. If the units of measure (Kg, for instance) are
different in various records, then you'll likely want to use a different
update query to update a UnitsOfMeasure field with this information.
Tom Wickerath, Microsoft Access MVP
http://www.access.qbuilt.com/html/ex...tributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
"jlambo" wrote:
> I have downloaded data into a system data into a text file. I have imported
> this data into access using a link table.
>
> Included in the data from the text file is data in units of measure ie
> 1,234.567 kg. I have set the data type as text
>
> How do I convert 1,234.567 kg to a numeric (ie 1234.567)