Remove Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

You can use the InStr Function to determine where the ( is located and then
use the Left function to pull everything in front.

OR

Use the replace function to replace "(M)" with "".
 
I thought the Trim() function would work but it is not.

If I have this:
Side of Butter (M)
and I want to change it to:
Side of Butter

It's not always Side of Butter, it could be Extra Sauce (M) or something
else as well, the constant is that (M) is always at the end.

Which function would I use?
Right()
Left()
RTrim()
LTrim()
Trim()
or none of the above?

Any help appreciated.
Thanks
DS
 
Like Daniel said

Replace(YourField , "(M)", "")

BTW, LTrim() removes leading spaces, RTrim() removes trailing spaces, and
Trim() does both all at once!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
Daniel said:
You can use the InStr Function to determine where the ( is located and then
use the Left function to pull everything in front.

OR

Use the replace function to replace "(M)" with "".
Thanks.
Replace works well.
DS
 
Linq said:
Like Daniel said

Replace(YourField , "(M)", "")

BTW, LTrim() removes leading spaces, RTrim() removes trailing spaces, and
Trim() does both all at once!
Thanks!
DS
 
Back
Top