Need to output a recordset in a fixed length format to a text file using the Print# or Write# statement.

This is what I have so far but when the field is longer than what the tab allows it writes it on the next line instead of forcing it on the same line (or writing over the existing field) Please Help!!



Open "test3.txt" For Output As #1

While Not rs.EOF

Print #1, Tab(0); rs.Fields("Ship_To_ID"); Tab(14); rs.Fields("Ship_To_Name"); Tab(39); rs.Fields("Ship_To_Address_1");
Print #1, Tab(64); rs.Fields("Ship_To_City");



rs.MoveNext
Wend
Close #1