Delete carriage returns

G

Guest

I have some fields where someone has used carriage returns with data entry.
Now, I need to export this data into a flat text file, and these carriage
returns are obviously messing up the record layout. Is there any way to
delete these carriage returns from my Access fields before I export to a text
file?
 
F

fredg

I have some fields where someone has used carriage returns with data entry.
Now, I need to export this data into a flat text file, and these carriage
returns are obviously messing up the record layout. Is there any way to
delete these carriage returns from my Access fields before I export to a text
file?

If your version of Access supports the Replace Function, you can run
an update query to replace all of the returns (with what?)
This Update query replaces the returns with a single space.
Use "" if you want to replace the returns with nothing.

Back up your table first.

Update YourTable Set YourTable.FieldName = Replace([FieldName],chr(13)
& chr(10)," ");
 
F

fredg

I have some fields where someone has used carriage returns with data entry.
Now, I need to export this data into a flat text file, and these carriage
returns are obviously messing up the record layout. Is there any way to
delete these carriage returns from my Access fields before I export to a text
file?

If your version of Access supports the Replace Function, you can run
an update query to replace all of the returns (with what?)
This Update query replaces the returns with a single space.
Use "" if you want to replace the returns with nothing.

Back up your table first.

Update YourTable Set YourTable.FieldName = Replace([FieldName],chr(13)
& chr(10)," ");
 
G

Guest

I tried this but got a message: "6441 conversion failures due to type
conversion". 6441 seems like it might be about the right # of carriage
returns found. I was trying to replace the carriage return with 2 spaces.

fredg said:
I have some fields where someone has used carriage returns with data entry.
Now, I need to export this data into a flat text file, and these carriage
returns are obviously messing up the record layout. Is there any way to
delete these carriage returns from my Access fields before I export to a text
file?

If your version of Access supports the Replace Function, you can run
an update query to replace all of the returns (with what?)
This Update query replaces the returns with a single space.
Use "" if you want to replace the returns with nothing.

Back up your table first.

Update YourTable Set YourTable.FieldName = Replace([FieldName],chr(13)
& chr(10)," ");
 
G

Guest

I tried this but got a message: "6441 conversion failures due to type
conversion". 6441 seems like it might be about the right # of carriage
returns found. I was trying to replace the carriage return with 2 spaces.

fredg said:
I have some fields where someone has used carriage returns with data entry.
Now, I need to export this data into a flat text file, and these carriage
returns are obviously messing up the record layout. Is there any way to
delete these carriage returns from my Access fields before I export to a text
file?

If your version of Access supports the Replace Function, you can run
an update query to replace all of the returns (with what?)
This Update query replaces the returns with a single space.
Use "" if you want to replace the returns with nothing.

Back up your table first.

Update YourTable Set YourTable.FieldName = Replace([FieldName],chr(13)
& chr(10)," ");
 
R

Rick Wannall

Can you post the line(s) of code that you're using to do this,please.

kayabob said:
I tried this but got a message: "6441 conversion failures due to type
conversion". 6441 seems like it might be about the right # of carriage
returns found. I was trying to replace the carriage return with 2 spaces.

fredg said:
I have some fields where someone has used carriage returns with data
entry.
Now, I need to export this data into a flat text file, and these
carriage
returns are obviously messing up the record layout. Is there any way
to
delete these carriage returns from my Access fields before I export to
a text
file?

If your version of Access supports the Replace Function, you can run
an update query to replace all of the returns (with what?)
This Update query replaces the returns with a single space.
Use "" if you want to replace the returns with nothing.

Back up your table first.

Update YourTable Set YourTable.FieldName = Replace([FieldName],chr(13)
& chr(10)," ");
 
R

Rick Wannall

Can you post the line(s) of code that you're using to do this,please.

kayabob said:
I tried this but got a message: "6441 conversion failures due to type
conversion". 6441 seems like it might be about the right # of carriage
returns found. I was trying to replace the carriage return with 2 spaces.

fredg said:
I have some fields where someone has used carriage returns with data
entry.
Now, I need to export this data into a flat text file, and these
carriage
returns are obviously messing up the record layout. Is there any way
to
delete these carriage returns from my Access fields before I export to
a text
file?

If your version of Access supports the Replace Function, you can run
an update query to replace all of the returns (with what?)
This Update query replaces the returns with a single space.
Use "" if you want to replace the returns with nothing.

Back up your table first.

Update YourTable Set YourTable.FieldName = Replace([FieldName],chr(13)
& chr(10)," ");
 

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