Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exporting Query to Tab Delimited Text File

374 views
Skip to first unread message

septimus

unread,
Mar 20, 2012, 12:41:19 PM3/20/12
to
I have a query I need to export to a tab delimited text file via VBA.

I tried the OutputTo method ("DoCmd.OutputTo acOutputQuery,
"qryToExport", acFormatTXT, strPath"), but that resulted in a text
file delimited by dotted lines. Useless in my case.

I tried manually exporting to text file using the "Export to Text
File" wizard, using the "Advanced" options to set the Field Delimiter
to {tab} and the Text Qualifier to {none}, and saving those
specifications. That seems to work okay one time.

But then when I use the TransferText method ("DoCmd.TransferText
acExportFixed, "Specifications", "qryToExport", strPath"), the data is
all spaced out with enormous spans between columns and does not seem
to be tab delimited when I try to open it in Excel.

Am I doing something wrong? Is there a better way? Surely Microsoft
has devised a simple way to perform such a basic function!

Thanks...

bobh

unread,
Mar 20, 2012, 4:27:58 PM3/20/12
to
I think you may want to try acExportDelim in place of acExportFixed
bobh.

Evan Cater

unread,
Mar 20, 2012, 5:45:23 PM3/20/12
to
Ah, yes, that's it exactly! Thanks, bobh.
0 new messages