Importing csv file

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
 
K

Ken Snell

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.
 
G

Guest

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",
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top