Like function

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

Is there a way using the "LIKE" funtion/command to do a
query on a table? I am looking to build a query that a
user can enter in an address (ex 7th) and the Query would
return all examples of 1234 7th ST or 500 7th AVE. Is
there a way to accomplish this?
 
yes, in the query for the field you wish to evaluate, in the criteria,
enter:

Like "*" & [Enter partial string] & "*"


Rick B

Is there a way using the "LIKE" funtion/command to do a
query on a table? I am looking to build a query that a
user can enter in an address (ex 7th) and the Query would
return all examples of 1234 7th ST or 500 7th AVE. Is
there a way to accomplish this?
 
Claude,
The Like operator requires the use of wildcards or, else, it is essentially
the same as =. If I have the following criteria, Like [Enter A Name], and
someone types "Smi" in the parameter box, the name "Smith" will not be
returned. However, if I use Like "*" & [Enter A Name] & "*", it will return
"Smith", "Smithson", etc.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Claude said:
Its easy just create a query of the tabe and under the field with the addres info
you just use "Like []" then you will have a box where you fill in for ex 7th and all
records with 7th will apper

MVH T

Ron said:
Is there a way using the "LIKE" funtion/command to do a
query on a table? I am looking to build a query that a
user can enter in an address (ex 7th) and the Query would
return all examples of 1234 7th ST or 500 7th AVE. Is
there a way to accomplish this?
 
Back
Top