Fixed-Width text file export

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

Guest

I am exporting a query to a fixed-width text file. I need to insert a
carriage return or linefeed into the record so that part of each record is
placed on a new line of the text file.
 
Hi Emooz,

You need to use a calculated field in your query that adds the CR and LF
to the last field value on each line of the record, e.g.

MyField: [MyTable].[MyField] & Chr(13) & Chr(10)

You have to include the two characters CR and LF when you're calculating
field widths. For example, if your record has 80 characters on the first
line and 65 on the second, the record length will be 80+2+65.
 
Back
Top