search

J

jason

hi everyone, ran into a little problem hopefully someone
can help me with.
I have a search form that I enter in any string of text
and it will search a field in one of my tables for the
string of text. This is how it is coded.

stLinkCriteria = "[User Name]like" & "'*" & Me![Text0]
& "*'"

as you can see [User Name] is the field it is searching in
a table i have.
I was wondering if there is a way for me to manipulate
this code so that instead of just searching the [User
Name] field i can make it search the other two fields in
the table as well? Im not an expert or anything in coding
but trying to learn as i go.
 
A

Allen Browne

stLinkCriteria = "([User Name] Like ""*" & Me.Text0 & _
"*"") OR ([AnotherField] Like ""*" & Me.Text0 & _
"*"") OR ([MyThirdField] Like ""*" & Me.Text0 & "*"")"
 

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