How to remove Carriage Returns and Line Feed characters from my Access 2010 database?

How do I remove Carriage Returns and Line Feed characters from my Access 2010 database?

Thanks
LVL 1
greghollAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent DyerIT Security Analyst SeniorCommented:
There used to be a Search and Replace too for Access 97.  However, it was an MDE and it has been a very long time..

But essentially, you are going to be running something like:

UPDATE SOMETABLE
SET SOMECOLUMN = REPLACE(vbcrlf,""):,

Open in new window

Another way
UPDATE SOMETABLE
SET SOMECOLUMN = REPLACE(CHR(13) & CHR(10),""):

Open in new window

Note: If there is any UNIX Data or MAC data you may have to do a couple of iterations with CHR(13) and/or CHR(13) alone.  DOS/Windows uses both 13/10 together..

Here is some really good background / help for you..

http://office.microsoft.com/en-us/access-help/find-and-replace-part-or-all-of-a-record-in-an-access-table-query-or-form-HP005187609.aspx

HTH,

Kent
0
greghollAuthor Commented:
Thanks.

I'm getting the following error:

1
0
jerryb30Commented:
UPDATE final
SET billingaddress1 = REPLACE(billingaddress1,CHR(13) & CHR(10),""):
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Ron MalmsteadInformation Services ManagerCommented:
Open the table in view..select the column.
Find and replace
^13
""
Try that..
0
mbizupCommented:
Kdyer's comment looks very close to the mark -- except for the trailing colon at the end.  It should be a semicolon (which in itself is optional - not necessary).  You also need to include the column name in the replace function:

<<
UPDATE SOMETABLE
SET SOMECOLUMN = REPLACE(CHR(13) & CHR(10),""):
>>

Should be:

UPDATE SOMETABLE
SET SOMECOLUMN = REPLACE(SOMECOLUMN , CHR(13) & CHR(10),"")

Open in new window

0
greghollAuthor Commented:
Thanks guys!

For the record, here is the corrected syntax that worked:

UPDATE final
SET billingaddress1 = REPLACE(billingaddress1,CHR(13) & CHR(10),", ");



You guys had put colons on the end.
I Couldn't get xuserx2000's solution to work
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.