Replacing text with numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to convert text fields into numeric, but all the numbers have a quote in front of them ('5 or '4 or '3). Looks like it was converted into a number text field or something. Can this be done?
 
you can run an Update query to get rid of the leading quote, using the
following:

Right([TableName].[FieldName],Len([SameTableName].[SameFieldName])-1)

if there is no leading quote in some records, add the following criteria to
the query:

Like "'*"

after running the update query, open the table in design view and change the
field's data type to number.
fyi, i usually play it safe when using a new update query - i create a new
field in the table and update the data into the new field, so i can check
the results without changing the "real" data. when all is well, then i run
the update query on the "real" field.

hth


Susieq said:
I'm trying to convert text fields into numeric, but all the numbers have a
quote in front of them ('5 or '4 or '3). Looks like it was converted into a
number text field or something. Can this be done?
 
I'm new to this website, and posted this in Access.....I'm using Excel. Any ideas with Excel and replacing the data?

Well... post in Excel. Access and Excel are quite different programs!
 
Hi Susieq,

Try this:

Sub RemoveApostrophes()
Dim C As Excel.Range
For Each C In Application.Selection.Cells
C.Formula = C.Formula
Next
End Sub
 
Back
Top