Export as Textfile with VBA

M

moondark

Hey there,

I need to export a table from Access (I know this is an excel forum but
I did not find any access forum that could help) to text, using VBA. I
used the SELECT...INTO...-SQL-statement but I didn't find a way to
export as textfile, .dbf seems to be the only format.

TIA,
Simon
 
G

Guest

The expample below exports a table named tblSummary as a delimited text file
to a file named tblSummary.txt, without Field names. The 2 arguments
indicated by double quotes are specification name, which is a predefined
layout for exporting data, and HTML table name.

DoCmd.TransferText acExportDelim, "", "tbllSummary", "tblSummary.txt",
False, ""
 
M

moondark

Thanks for the help, it worked.

I just wondered if it is possible to export specific Fields only.
Perhaps someone could help me with this one.

Regards,

Simon
 

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