Importing csv file

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

I'm running the following code...

DoCmd.TransferText
acImportDelim, "", "tblTEST", "C:\data.csv", True.

The problem is 2 columns are being imported as "Currency"
when the data is actually text. For example, in the csv
file, "F837250" is coverted in Access to Currency and the
Access table displays $837,250.

How do I make Access import this column as text?

thanks
Rich
 
Use an Import Specification.

You set up your spec by starting to do the import manually, and when the
wizard window opens, click on the Advanced button at bottom left -- you then
can set all the export specification parameters and save the spec as
whatever name
--

Ken Snell
<MS ACCESS MVP>
you want. Then cancel the import and use the spec name in the
DoCmd.TransferText method:

DoCmd.TransferText acImportDelim, "ImportSpecificationName", "tblTEST",
"C:\data.csv", True.
 
EXCELLENT. THANKS

-----Original Message-----
Use an Import Specification.

You set up your spec by starting to do the import manually, and when the
wizard window opens, click on the Advanced button at bottom left -- you then
can set all the export specification parameters and save the spec as
whatever name
--

Ken Snell
<MS ACCESS MVP>
you want. Then cancel the import and use the spec name in the
DoCmd.TransferText method:

DoCmd.TransferText
acImportDelim, "ImportSpecificationName", "tblTEST",
 
Back
Top