search

  • Thread starter Thread starter jason
  • Start date Start date
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.
 
stLinkCriteria = "([User Name] Like ""*" & Me.Text0 & _
"*"") OR ([AnotherField] Like ""*" & Me.Text0 & _
"*"") OR ([MyThirdField] Like ""*" & Me.Text0 & "*"")"
 
Back
Top