Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Feeds in Text File

Status
Not open for further replies.

Bonediggler1

Technical User
Jul 2, 2008
156
US
Hello-

I am using VBA to put strings together, insert into a table and then export to .txt for upload by a different business system.

The problem is the other system can only handle line feeds, whereas it seems as though Access puts carriage returns at the end of a string.

I tried to solve this by terminating each string with "& vbLf", but this resulted in a carriage return/line feed at the end of each string.

Seems as though I need to first eliminate the carriage return and then insert a line feed...

Any ideas and/or workarounds?


Thank you!!
 



hi,

Put a break in your code in order to observe the STRING of interest.

In the IMMEDIATE window observe the ASC() value of the LAST byte and the Next to last byte before you concatenate your vblf. After determining how much to chop off, code for that and concatenate your vblf.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Before I proceed with your suggestion, due to another limitation I am forced to copy the table contents and manually paste into a text file.

Will this have any impact on the data, even if it is correctly formatted via VBA?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top