query q 2

  • Thread starter Thread starter joe
  • Start date Start date
J

joe

first off thank you for the help earlier that is exactly
what i needed. hopefully only one more question. how do
i do a search for only part of a field in a query. i have
tried the * and the % as well as the like. what i want is
for them to only have to put in the first letter of the
category they are searching for or at most only the first
three letters. when i use the like "*" i get all that
contain the letter. (what i am suppose to get) so how do
i get it to search just the beginning of the string of the
category. do i use @beginning. i am grasping could use a
little more help though

thanks again
 
Dear Joe:

Are you searching for *ABC* or for ABC*. If you want those that
"contain ABC" then do the former. If you want those that "begin with
ABC" then you want the latter.

I think you want;

WHERE SomeColumn LIKE "ABC*"

Substitute % for * if you are using MSDE or SQL Server.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top