OT: Finding a carriage return in an Access field and removing it....

D

D. Shane Fowlkes

Sorry for the OT post but I've looked around for a bit and cannot find a
solution to what would seem a common problem. I considered posting in an
Access NG but they don't seem to have much traffic these days. I have a 3rd
party MS Access table and one of the fields in the table is littered with
carriage returns. These need to be removed but I don't know how. How can I
use a Find & Replace in Access to remove all carraige returns and/or line
feeds in a field so I can cleanly export to a txt file? Surely there's a
way to do this......

TIA
 
D

D. Shane Fowlkes

PS - and to clarify, the carriage returns to not show up in the record as a
visible character so I cannot copy it to be replaced. I know sometimes you
see a "square" that you can copy to use in a Find & Replace but not this
time....
 
K

Kevin Spencer

String.Replace(Environment.NewLine, "")

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Joined
Mar 18, 2008
Messages
1
Reaction score
0
Having a similar problem as D. Shane Fowlkes, please help

I am having a similar problem. I have users that are using the cut and paste function to fill in a memo field, and they are bringing in the carriage returns with it! I tried to put in the code you suggested: String.Replace(Environment.NewLine, "") in the find and replace field in the Find What field, but it does not appear to be working. When I click the Find Next button, it seems like it is running, but then I get the message that Microsoft Access finished searching the records. The search item was not found.

Some other info:
I am using Microsoft Access 2002
I am trying to match "Any Part of ield"
Search: "All"
Search Fields as Formatted is checked.

Any help you can provide would be greatly appreciated.

Wayne

PS It just dawned on me, is this VB Code???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top