Exporting a Table, Creating a csv file

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
 
B

Brian

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top