Remove square symbols between words in imported text

W

Wayne Viles

I have imported fields from an access database into a master access database,
but an imported text fields has square symbols between some of the text
words. How can these symbols be removed please
 
K

Ken Snell \(MVP\)

First, find out what character that symbol is representing. You can do this
by reading the Asc value of that character in a field via a query:

SELECT Asc(yourfield, CharacterPositionOfTheBox) AS AsciiValue
FROM yourtable
WHERE yourprimarykeyfield = SomeValue;

My initial guess... the original data came from an EXCEL worksheet, and in
that worksheet there were cells with more than one line in them. EXCEL uses
the LineFeed (LF, or Chr(10) character) to make a new line. However, ACCESS
uses the combination of CarriageReturn and LineFeed characters (CR and LF,
or Chr(13) & Chr(10) characters) to make a new line.

So, if my guess were correct, you could run an update query on the data in
the table to replace Chr(10) with Chr(13) & Chr(10):

UPDATE yourtable
SET yourfield = Replace(yourfield, Chr(10), 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

Top