Unwanted alternating lines of dashs in txt file

  • Thread starter Thread starter Sirocco
  • Start date Start date
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.
 
Hi Sirocco,

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

Use DoCmd.TransferText instead.
 
Back
Top