1

This code to import multiple CSV files into MS Access works really well for me: Import a large number of .csv files into Access

The one thing I would like to add is an import spec that imports each field as SHORT TEXT. I have the spec saved as "GPS1" but not a clue how to add it into the batch import code.

I have tried this

docmd.RunSavedImportExport ("GPS1")

but no luck.

Hennes
  • 64,768
  • 7
  • 111
  • 168
Andy Kolcz
  • 11
  • 2
  • I figured it out! All I had to do is add the spec name inside this line DoCmd.TransferText acImportDelim, "gps1", strTable, strPathFile, blnHasFieldNames – Andy Kolcz Jan 02 '18 at 21:04

1 Answers1

0

The sample code has a line...

DoCmd.TransferText acImportDelim, , strTable, strPathFile, blnHasFieldNames

Simply add your import specification to that line...

DoCmd.TransferText acImportDelim,"GPS1" , strTable, strPathFile, blnHasFieldNames
Jason
  • 1
  • 2