search/replace Enter key press within field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access 2002 table that has a Customer name field in which some
users have pressed "Enter" to create a second line in the customer name. Now
we are converting to a FoxPro front end, with SQL tables. When the data
displays in FoxPro the "Enter" displays as a rectangle and interferes with
certain functions. When I view the SQL table using Access, it still shows
the Customer name as two lines. How can I search for and replace, or update
the data to eliminate this "Enter" key character?
 
You can use the Replace function in an update query to get rid of the
characters. Check online help for the syntax for the replace function as I am
going from memory.

UPDATE YourTableName
SET CustomerName = Replace([CustomerName],Chr(13) & Chr(10),"",1,-1,1)
WHERE CustomerName Like "*" & Chr(13) & Chr(10) & "*"
 

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

Back
Top