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.
 

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