What is the box character in a text field and how do I replace it?

D

Dave

I have a text\memo filed that has a box charter(s) in it. I do not remember
if it is a carriage return or whatever. Whats is the character and how do I
replace it?

Thanks

Dave
 
J

John W. Vinson

I have a text\memo filed that has a box charter(s) in it. I do not remember
if it is a carriage return or whatever. Whats is the character and how do I
replace it?

Thanks

Dave

You'll need to find out what it is. My guess is that it's a linefeed Chr(10) -
it wouldn't hurt to make a backup of your database just in case, and run a
query

SELECT memofield, InStr([memofield], Chr(10))
FROM tablename
WHERE memofield LIKE "*" & Chr(10) & "*"

to see if it shows the records with the box and the position of the linefeed.
Count characters and see if it matches.

You could then run an Update query updating the memo field:

UPDATE tablename
SET memofield = Replace([memofield], Chr(10), "")

Note that if the field has legitimate carriage return-linefeed characters this
will do more harm than good!
 
J

Jerry Whittle

SELECT YourTable.YourField,
Replace([YourTable]![YourField],Chr(13)," ") AS WO_Characters
FROM YourTable
WHERE (((YourTable.YourField) Like "*" & Chr(13) & "*"));

Use something like above and replace the 13 with the various non-prining
ASCII characters. 13 and 10 are good places to start.

Next make a backup of the database. You might even want to make a copy for
testing. Change the 13 below to the value you fine above. This update query
will replace it with a space.

UPDATE YourTable
SET YourTable.YourField
= Replace([YourTable]![YourField],Chr(13)," ");
 

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

Top