SEARCH


 


How to Replace CR and New Lines

If there is any time you want to replace carriage returns and new lines in MS Access fields, then use the following update queries.

Replacing Carriage Returns

UPDATE <TABLE> SET <COLUMN> = replace(<COLUMN>,'chr$(13)','\r');

Replacing New Lines

UPDATE <TABLE> SET <COLUMN> = replace(<COLUMN>,'chr$(10)','\n');

In the examples above I have changed the values to PHP and MySQL friendly \r and \n values, but you could also change these to HTML <br> if you wish.