Importing CSV file to Access




I am trying to import a CVS file using following command
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"tblTempUpload", txt_box_file_path & strFileName

It gives me error.. Says external table is not in correct format.

What could be the problem ?


Biswajit Jena

Hi Tina.

Thanks for your suggestion.
Would you please let me know the complete syntax as I am not able to
use it as you said ?
I am writing :
DoCmd.TransferText acImportDelim, "tblTempUploadWeir",
txt_box_file_path & strFileName

It is expecting a Speccification which I dont know what to do.

John Nurick

It's not normally necessary to use an import specification for a CSV
file. Omit the SpecificationName argument:

DoCmd.TransferText acImportDelim, , "tblTempUploadWeir", _
txt_box_file_path & strFileName, True

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