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

removing carriage return from records

Status
Not open for further replies.

greenfibres

IS-IT--Management
Mar 17, 2006
31
0
0
GB
Hi
I have an Access '97 table that has addresses of contacts.
Some of the fields have been populated from the Form that is bound to this Table, with second and sometimes third lines of text.
I need to export these addresses to a totally different application (probably via Excel) but this new application cannot handle more than single lines of records.
Is there a way to remove the carriage returns and replace with a comma?
Thanks in advance
Jim
 
Hi Remou
Sorry, it took me a while to get back to this

here's my code
UPDATE Cust SET Cust.[Billing Address 2] = FindAndReplace([Billing Address 2],(Chr(13)+Chr(10)),", ")

Unfortunately I just get the following message:-

undefined funtion 'FindAndReplace' in expression

Please note I'm using Access97 if that makes a difference
 
You need to copy the code from the link I posted into a module in your database.
 
Try
Code:
UPDATE Cust SET Cust.[Billing Address 2] = FindAndReplace(FindAndReplace([Billing Address 2],Chr(10),", "), Chr(13), ", ");
 
WinblowsME
Why the extra level of complication?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top