View Single Post
  #5  
Old May 14th, 2010, 04:03 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Query using multiple values from one text box

Another way, not the best, is to enter items separated by a space like this --
Alaska Alabama Texas
Use criteria --
Like "*" & [Enter item(s) for search] & "*"

It has drawbacks in that if you enter Bill it will pull Bill,
Billboard, and Billards.

--
Build a little, test a little.


"shm135" wrote:

Hi,

I have a form called Test. On this form, I have a textbox where I can
type query criteria. I would like to be able to type multiple criteria
into this textbox and use this textbox to filter my query results.

For example, on my Test form textbox, I'd like to be able to type
("Alaska" OR "Alabama") and would like to then filter my query based
on what I type into this textbox.

Currently, when I type one thing into the textbox "Alaska," the query
properly filters to all results that equal "Alaska." However, when I
type another piece of critiera "AND Alabama" or "OR Alabama", the
query returns no results.

How can I accomplish this?

Thanks
.