trailer record

  • Thread starter Thread starter Guest
  • Start date Start date
How do I create a trailer record in a text data file with fields?

You'll need to provide a bit more context here, Curly. What are you
creating this *from*? An Access table that you're exporting to text?
What exactly do you mean by a "trailer" record (I gather it's some
sort of record after the last of the detail records, but what's in
it)?

John W. Vinson[MVP]
 
Thank you for replying. I am importing and exporting text files using Access
that containa trailer record. The trailer record is the last line in the
file. My problem is that the fields for the trailer record line are not the
same as the fields for the rest of the data. There are common and not common
to each other fields. The trailer record might contain 4 fields whereas the
other data might contain 14 fields. Also, the trailer record might contain a
field that the other data does not have. The trailer record line contains a
999999999 for example in one of the fields as a trigger to say there are no
more records. There is also a record count field on the trailer record line
to ensure the proper # of records was imported.
 
Thank you for replying. I am importing and exporting text files using Access
that containa trailer record. The trailer record is the last line in the
file. My problem is that the fields for the trailer record line are not the
same as the fields for the rest of the data. There are common and not common
to each other fields. The trailer record might contain 4 fields whereas the
other data might contain 14 fields. Also, the trailer record might contain a
field that the other data does not have. The trailer record line contains a
999999999 for example in one of the fields as a trigger to say there are no
more records. There is also a record count field on the trailer record line
to ensure the proper # of records was imported.

Sounds like you'll need to use the VBA WRITE statement from a
recordset, rather than using File... Export. This gives you full
flexibility - you can open a recordset, step through it using
MoveNext, write to the external file, count records, etc. etc.

Take a look at the VBA help on Write and post back if it's not clear.

John W. Vinson[MVP]
 

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

Back
Top