0

I have an ms Access database and using VBA in this database i and trying to open several csv files and copy data from each one to a new ms Excel workbook using DAO. I am using the connection string as below and i get a Run Tine Error 3044 - which is saying it is not a valid path.

I have tried saving the file down as a .xlsx and changing the string as below and this works fine. Clearly as this works with the .xlsx and not with the csv there is something wrong with my connection string used for the csv. The variable strSourceFile is the full name of the file; ie, path and file name.

I will be grateful if someone will give me the correct connection string.

Connection string used for the csv which fails. OpenDatabase(strSourceFile, False, True, "Text;") This fails

Connection string for the .xlsx which works fine. OpenDatabase(strSourceFile, False, True, "Excel 12.0;) This works fine.

Regards

Spike

Spike
  • 11
  • 1

0 Answers0