Importing text with commas

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

Guest

I am importing a tab delimited file that has some number fields with commas.
Nothing gets imported. How can I get them to import without removing all the
commas first.
 
One way is
1) import them to text fields
2) add a numeric field for each of the fields in question
3) use an expression like this in an update query to put the numbers
into the numeric fields:
CLng(Replace([FieldWithCommas], ",", ""))
If the numeric field subtype is other than Long, use the appopriate
conversion function, e.g. CDbl().
4) Delete the now-superfluous text fields.

But you may find it less trouble to remove the commas first, e.g. by
using the find-and-replace feature in Word or a text editor.
 
Back
Top