Remove square symbols between words in imported text

  • Thread starter Thread starter Wayne Viles
  • Start date Start date
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
 
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));
 
Back
Top