Fixed-Width text file export

E

Emooz

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.
 
J

John Nurick

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.
 

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

Top