Ignore certain words in textbox (1 Viewer)

Atthe

Member
Local time
Today, 06:57
Joined
Oct 26, 2021
Messages
57
Hi All,

I have a search text box in my forms and frequently have end users enter irrelevant information into the text whilst trying to search which results in no matches found.

Can someone help with some code to remove certain words(That I can specify from within the code) from the text box (Example the end users searches 'Apple 2345' I need the code to remove Apples and leave me with '2345'

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 22:57
Joined
Oct 29, 2018
Messages
21,477
Hi. You could use the Replace() function. For example:

Replace([Textbox], "apple", "")
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:57
Joined
May 7, 2009
Messages
19,247
what "specifics" do you need to remove? the text and leave only the number?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 01:57
Joined
May 21, 2018
Messages
8,536
Maybe something like this search feature would work to give total flexibility.
The user can type in "Apple 1234" then have the option to search "Apple", "1234", "Apple or 1234", "Apple and 1234"
 

jdraw

Super Moderator
Staff member
Local time
Today, 01:57
Joined
Jan 23, 2006
Messages
15,379
You could have an Ignore list for those words/strings you do not want to be in the search criteria.
 

Users who are viewing this thread

Top Bottom