Unwanted alternating lines of dashs in txt file

S

Sirocco

I want to output the results of a query to a txt file (plain text) and have
this VB code, which works (I made the variables more generic for the purpose
of this question), except that alternating lines in the resulting text file
are filled with dashes, which, of course, I don't want. Has anybody
experienced this problem, and how did you resolve it? Here's the code:


DoCmd.OutputTo acOutputQuery, qryname, acFormatTXT, "C:\Documents and
Settings\username\Desktop\filename.txt"



Many thanks in advance.
 
J

John Nurick

Hi Sirocco,

This is the standard format for OutputTo ... acFormatTxt: the rows of
hyphens are meant to represent cell borders.

Use DoCmd.TransferText instead.
 
Top