(Solved) – Access VBA TransferText Outputting Records out of Order

(solved)-–-access-vba-transfertext-outputting-records-out-of-order

I have an MS Access application that concatenates data from multiple sources and a form, builds a table from that and then exports the table line by line to a text file which it then renames to change the extension from .txt to .ipj. The purpose of this is to create a text file which is read by our statistical process control program.

This was working for months, but it suddenly started to scramble the order of the output file about 3 weeks ago. The order of the source table and query is as I want it to look, but the output does not look like the source table or query.

I’ve tried both the DoCmd.Transfertext method and loading the table into a recordset and printing it to the file line-by-line with a Do While Not rst.EOF loop. Both times I get the same problem: lines in places they’re not supposed to be.

I’m running MS Access 365 and it’s up to date on updates.

Any suggestions to debug this problem?

Leave a Reply

Your email address will not be published. Required fields are marked *