searching for text

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

Guest

Hello,

I'm trying to test data that the user selected from a combo box that has
text. For example, if the selection has at the suffix "full" then I want
the text of the selection without the suffix "full". Not all selections have
the suffix "full". The problem is that each selection on the combo box list
is not consistent in the length of characters.
It's like wanting the first part of the text minus the "full" text. Is
there any built-in functions for this? The Left() function requires a
constant length.
Any pointers to this will greatly help. Thank you.
 
Hello,

I'm trying to test data that the user selected from a combo box that has
text. For example, if the selection has at the suffix "full" then I want
the text of the selection without the suffix "full". Not all selections have
the suffix "full". The problem is that each selection on the combo box list
is not consistent in the length of characters.
It's like wanting the first part of the text minus the "full" text. Is
there any built-in functions for this? The Left() function requires a
constant length.
Any pointers to this will greatly help. Thank you.

as criteria use:
Not Like "*" & [enter suffix]

Which will return all records that do not end with whatever text was
entered at the prompt.
 
Instead of the Len function, use the Replace function:

MyString = Relace(MyString,"full","")
If it was "Doubtfull" it will return "Doubt" Lenght is not a factor.
If it was "Doubt" the "Doubt" is returned
 

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

Back
Top