PC Review


Reply
 
 
jason
Guest
Posts: n/a
 
      17th Dec 2003
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.

 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      17th Dec 2003
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.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Companion does not search where I tell it to search Andy Bonanno Windows XP General 4 20th Apr 2005 03:09 PM
cannot remove search assistant - my search/my quick search bar =?Utf-8?B?Y2hyaXMgYm9uZHk=?= Windows XP Help 1 2nd Apr 2005 05:54 AM
search assistant-my search/my qucik search bar =?Utf-8?B?Y2hyaXMgYm9uZHk=?= Windows XP Help 2 1st Apr 2005 03:07 PM
Text Search: how to search a substring using search companion Search Question Windows XP General 2 23rd Mar 2004 04:28 PM
Win Explorer "Search" button on tool bar launches web search instead of Search Assistant T Pagano Microsoft Windows 2000 0 22nd Jan 2004 12:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 AM.