Importing Multiple CSV files into Access 2007
Posted on 2011-03-22
I need to import multiple CSV files into a table in Access. The CSV files are all of the same format however, they all live in sub folders within the "Export" directory.
This is what I have so far but it will only import CSV files that are in the Export directory, not the sub directories within 'Export'.
Please help! Thanks!
Dim csvFile, csvpath
csvpath = "C:\Export"
csvFile = Dir(csvpath & "\*.csv")
While csvFile <> ""
DoCmd.TransferText acImportDelim, "FullCSVImportSpec", "tblCSV", csvpath & "\" & csvFile, , "" '
csvFile = Dir