Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Typing part of word in Query

Status
Not open for further replies.

jamespeters01

IS-IT--Management
Apr 3, 2001
75
GB
Hi all,

I used to remember how to do this but for some reason I havn't a clue now.

I know its possible to type, for instance the 1st three letters of the field you have set the criteria on, and it pulls all the records that include those 3 letters in any part of the word / phrase.

for instance, I'm looking to find all records that relate to "Accounts Payable, sales, orders" and I would like to just be able to type "Accounts"

Can someone please refresh my mind.


Thanks
 
use the LIKE operator:

this will find all instance where the beginning of the word is ABC
WHERE SomeField LIKE 'ABC*'

this will find all instance where the end of the word is ABC
WHERE SomeField LIKE '*ABC'

this will find all instance where ABC is found anywhere in the word
WHERE SomeField LIKE '*ABC*'


HTH




Leslie
 
Thanks leslie,

But I would like to use a similar function to [Type Source name ?] in the criteria and the user only has to enter part of the word and all fields with those letters are pulled.




Thanks
 
then I believe you would put:

WHERE SomeField LIKE [Type Source Name:] & "*"

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top