1. How would you make a query that allows users to enter a letter or a few
letters and selects all Customers Last Name that have those letters ANYWHERE
in the name?
2. How would you make a query that displays dates like this May 2-10 and
June 2-10 using the Between Operator?
HELP ME PLEASE
pietlinden@hotmail.com - 31 Oct 2007 03:43 GMT
> 1. How would you make a query that allows users to enter a letter or a few
> letters and selects all Customers Last Name that have those letters ANYWHERE
[quoted text clipped - 3 lines]
>
> HELP ME PLEASE
one question at a time... works better that way...
1. Are you looking or a string inside the name? Like "pha" in
"alphabet"? or "p*h*a" in "Philadelphia"?
Sounds like you're looking for LIKE
SELECT Fname, LName
FROM SomeTable
WHERE LName LIKE "*pha*";
if that doesn't do it, try posting an example field value (or a few...
enough for everyone to get an idea of what you mean).
Pieter
Marshall Barton - 31 Oct 2007 05:11 GMT
>1. How would you make a query that allows users to enter a letter or a few
>letters and selects all Customers Last Name that have those letters ANYWHERE
>in the name?
>2. How would you make a query that displays dates like this May 2-10 and
>June 2-10 using the Between Operator?
Use a criteria something like this:
Like "*" & [Enter a few letters] & "*"
You want dates without concerns for the year??? Try using a
calculated field with an expression like this
Month(dt) In (5,6) And Day(dt) Between 2 And 10
and set its criteria to True

Signature
Marsh
MVP [MS Access]