[AccessD] Find and Remove Carriage Return

Heenan, Lambert Lambert.Heenan at AIG.com
Fri Jun 2 15:51:05 CDT 2006


Presumably you really mean Cr Lf combinations, i.e. what looks like a new
line to us humans. In VB land this is the string vbCrlf.

To do this in a query you need a simple one-line function, because JET does
not see VB constants...

Function CrLf() as String
	CrLf = vbCrLf
End Function

Armed with this you can update the text/memo field in a query with this sort
of SQL...

UPDATE Table1 SET Table1.[yet another memo] = Replace(Cstr(nz([yet another
memo],"")),CrLf(),"");


The part that does the work being 

Replace(Cstr(nz([yet another memo],"")),CrLf(),"")


HTH

Lambert


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Reuben Cummings
Sent: Friday, June 02, 2006 4:26 PM
To: AccessD
Subject: [AccessD] Find and Remove Carriage Return


How can I look into a field and find and remove any returns?

Thanks.

Reuben Cummings
GFC, LLC
812.523.1017




-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list