transfer data to comma delimited file

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

Guest

I would like to take the data from two tables and output the information into
a comma delimited file. The two tables are linked. The first table has header
and line total information. The second table has line detail information.
There may be several lines for each header.
Is there a way to output the header information, followed by the detail info
for that header, followed by the total info for that header and then output
the next header.
 
If you combine the 2 tables in a query, and use TransferText, you get the
normal output, but not the header records intersperced by the detail
records.

It would be fairly straightforward to Open a file for Output, open a
recordset based on the above query, create the delimited line from the
header, Print # to output that line from the main recordset, then Print #
each related record until you reach one that has a different main record and
then print the header line, and so on. See help on Open and Close if that's
new.
 
Back
Top