Exporting a Table, Creating a csv file

  • Thread starter Thread starter Ganz
  • Start date Start date
G

Ganz

Is there a method of exporting a table from Access in csv format which
creates the destination file if it does not exist?

Using the Transfer Text method seems to require that the destination
file already exists, and the Output Table method does not offer csv
format as a file type.

If I manually export a table in csv format, it creates the destination
file no problem, so I presume that there must be a way to do this in
code.

Any help would be appreciated.

Mark
 
TransferText does not require that the file pre-exist. Just specify it like
this:

DoCmd.TransferText acExportDelim, ,"Table1", "MyCSVFile.csv"

The ".csv" will automatically tell Access how to delimit the file.
 
Back
Top