A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2010, 02:46 PM posted to microsoft.public.access
Dave
external usenet poster
 
Posts: 2,331
Default What is the box character in a text field and how do I replace it?

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
  #2  
Old April 27th, 2010, 05:04 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default What is the box character in a text field and how do I replace it?

On Tue, 27 Apr 2010 06:46:01 -0700, Dave
wrote:

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!
--

John W. Vinson [MVP]
  #3  
Old April 27th, 2010, 05:07 PM posted to microsoft.public.access
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default What is the box character in a text field and how do I replace it?

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)," ");
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Dave" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.