stLinkCriteria = "([User Name] Like ""*" & Me.Text0 & _
"*"") OR ([AnotherField] Like ""*" & Me.Text0 & _
"*"") OR ([MyThirdField] Like ""*" & Me.Text0 & "*"")"
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"jason" <(E-Mail Removed)> wrote in message
news:092d01c3c4ab$a8398720$(E-Mail Removed)...
> 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.
>