help with removing extra letters from field(urgent)

help with removing extra letters from field(urgent)

Post by Laure » Thu, 06 Nov 2003 10:02:08


Hello, everyone. I am working on a sample database for
learning purposes. I want to remove the extra letters (xx)
from the field, which is Field2. Datasheet view. The word
Texas, it is spelled differently One way it is spelled is
Texasxx, another is Texxxas, and so forth. How am I to
remove the extra xx? Thank you for your assistance.
 
 
 

help with removing extra letters from field(urgent)

Post by John Vinso » Thu, 06 Nov 2003 15:19:43

On Tue, 4 Nov 2003 17:02:08 -0800, "Lauren" < XXXX@XXXXX.COM >



YOu can use the Replace() function to do this. I think in another
thread you said that you were using A2002 (and please, keep questions
to the same thread rather than starting a new one!).

Update the field to

Replace([Field2], "xx", "")

This will find each instance of the string xx in Field2 and replace it
with a null string, and then update Field2 to the result.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://www.yqcomputer.com/

 
 
 

help with removing extra letters from field(urgent)

Post by anonymou » Thu, 06 Nov 2003 22:16:12

OK, Thank You. I do have another question. What expression
would you use to remove spaces from a field.
I will keep to same thread, trying to help someone else.



< XXXX@XXXXX.COM >

(xx)
word
is
another
keep questions
and replace it
 
 
 

help with removing extra letters from field(urgent)

Post by John Vinso » Fri, 07 Nov 2003 01:24:30

On Wed, 5 Nov 2003 05:16:12 -0800,



A space is a character, just like x or * or _. If you wanted to
replace X by Y, you'ld use Replace(string, "X","Y").

So what would you use if you wanted to replace a space by something
else?


John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://www.yqcomputer.com/
 
 
 

help with removing extra letters from field(urgent)

Post by Laure » Fri, 07 Nov 2003 06:52:41


I think I made a mistake, what I need to know is, how to
remove all the spaces from the beginning of a field from a
table, In an update query.
Thank You for your patience. :)



expression
wanted to
something
 
 
 

help with removing extra letters from field(urgent)

Post by Tom Elliso » Fri, 07 Nov 2003 11:31:01

Dear Lauren:

John seems to be away for a bit, so I'll jump in.

There is a function LTrim that returns a string without leading white
space and would likely be just what you want here.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts

On Wed, 5 Nov 2003 13:52:41 -0800, "Lauren"
 
 
 

help with removing extra letters from field(urgent)

Post by Lar:thank » Fri, 07 Nov 2003 21:56:46


leading white

a

else.
by