like statements parameter value

G

Guest

I am trying to write a union query, i have entered the PARAMETERS and what to
select all ok I want it to find anything LIKE what enter in the field ie if
type "chester" if would find and display Manchester, Colchester,Chester have
try this :- WHERE [Job Number] Like [Search Details:]
OR [Cell I D] Like [Search Details:]
OR [In Number] Like [Search Details:]
OR [Site Name] Like [Search Details:]
Can u help
 
J

John Spencer (MVP)

You need to add wild cards to the criteria. With your version you might as well
use the = sign. I've only changed the line for [Site Name], but you should be
able to use that as a model if you need to change the other lines.

WHERE [Job Number] Like [Search Details:]
OR [Cell I D] Like [Search Details:]
OR [In Number] Like [Search Details:]
OR [Site Name] Like "*" & [Search Details:] & "*"
 
J

John Vinson

On Mon, 11 Oct 2004 15:07:02 -0700, "Top Dog" <Top
I am trying to write a union query, i have entered the PARAMETERS and what to
select all ok I want it to find anything LIKE what enter in the field ie if
type "chester" if would find and display Manchester, Colchester,Chester have
try this :- WHERE [Job Number] Like [Search Details:]
OR [Cell I D] Like [Search Details:]
OR [In Number] Like [Search Details:]
OR [Site Name] Like [Search Details:]
Can u help

The LIKE operator accepts wildcards, but if you don't include a
wildcard it returns exact matches only. Try:

WHERE [Job Number] Like [Search Details:] & "*"
OR [Cell I D] Like [Search Details:] & "*"
OR [In Number] Like [Search Details:] & "*"
OR [Site Name] Like [Search Details:] & "*"


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top