Mixed exporting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a vendor that needs a report exported from an accounting system to a
tab-delimited text file. I will used Access via ODBC to do this, but the
vendor requirements show that there are two sets of record types in the
single exported file:

Order records (one set of fields)
Detail records (a different set of fields)

While I would normally prefer to just export to two separate text files--one
for orders, one for details--the vendor requires not only that these be in
the same file, but that the detail entries be immediately below the order
entry so that I cannot simply export two separate files and then append one
to the other.

Should I just export this line-by-line to the text file using Open
<filename> as Output/Append? If so, am I correct in assuming that I must
insert the Tab characters rather than using TransferText? Or is there some
better way?

That is, is there a way to build or TransferText an entire line (instead of
an entire file) without having to insert the Tab character after each field
myself?
 
What you suggest (use Open <filename> For Output As ...) is how I would
approach this problem. Yes, you would concatenate Tab character into the
string that is to be exported as the line of data.
 
Thanks. I just did not want to go to all the concatenation work if there was
some simpler way. The only other way I can think of is to export the records
one at a time to a single-line text file, then (after the first one) append
subsequent text files to the first one (not sure how I would do that anyway),
but that sounds like it might be more work than just concatenating the string.
 
Back
Top