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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.txt file acting funky

Status
Not open for further replies.
Jun 11, 2008
34
US
I have an access table with a large file. In access, I am trying to export it to a .txt file. The first 3 columns look fine. ( I used comma separated delimited) When I get to the forth column, the data jumps several carraiges to the right. I believe there is a problem with the column because when I move the column to say the 10th position, the first nine columns work fine. The only thing I did differently to the suspect column was I populated it through an update query and now display the results on the table. It was a pretty straightforward query but the field data jumps carraige returns and throws off the .txt file. Any thoughts on how to fix it?
 
Are you saying you have a field with return characters that you wish to export to a delimited text file?
 
Yes. The first three fields export okay with no extra spaces. When I get to the suspect field, it moves several spaces to the right. I believe the issue is the column itself
 
You will have to export a query based on the table. Use Replace to get rid of the return characters.

Replace(fld,Chr(13)+Chr(10)," ")

Should do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top