Importing CSV file to Access

  • Thread starter Thread starter biswajit.tamu
  • Start date Start date
B

biswajit.tamu

Hi,

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 ?

Thanks
BJ
 
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.
 
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
 
Back
Top