We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

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

BungyStrap
BungyStrap asked
on
Medium Priority
509 Views
Last Modified: 2013-11-27
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
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2010
Commented:
Hello BungyStrap,

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

Regards,

Patrick

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.