• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 490
  • Last Modified:

How to perform a Find/Replace on non-printing characters in an Access text field

Hi there!

Having imported contact details from Outlook into A2003, the problem I have is that for some of the records the address shows on multiple lines, while for others it is all on one line, and there are no spaces between the parts of the address that should be on the different lines. Example shown as attached.

I've checked for what exactly is going on in the field (thanks eghtebas for the code); the multiple line records contain Carriage Returns and Line Feeds (Asc 13 and 10), but the single line fileds have only the Line Feed (Asc 10).

I want to make all the fields look the same, displaying on multiple lines. What is the easiest way to do this? Can I use the Find/Replace facility, and if so how? (I can't get it to find any of these non-printing characters, but I'm not sure of the correct syntax.)

I've been trawiling through the solutions for simialr problems but can't get anywhere, especially as my VB and SQL skills are none too good, so please forgive me. All advice gratefully received.

Benjy

address-layout.jpg
0
BungyStrap
Asked:
BungyStrap
1 Solution
 
Patrick MatthewsCommented:
Hello BungyStrap,

UPDATE SomeTable
SET SomeColumn = Replace(Replace(SomeColumn, Chr(10), Chr(13) & Chr(10)), Chr(13) & Chr(13), Chr(13))

Regards,

Patrick
0
 
BungyStrapAuthor Commented:
Thank you Patrick - I didn't realise that it would be so easy. I didn't use the code itself, but instead used the Replace function in a query.

Thanks again

Benjy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now