Remove Text

D

Daniel

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 "".
 
D

DS

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
 
L

Linq Adams via AccessMonster.com

Like Daniel said

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

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

DS

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
 
D

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
 

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