View Single Post
  #2  
Old May 14th, 2010, 02:41 PM posted to microsoft.public.access.queries
ghetto_banjo
external usenet poster
 
Posts: 325
Default Query using multiple values from one text box


Well, I don't think it will work by directly passing that textbox
value to the query. The query ends up searching for the actual string
of "Alaska OR Alabama", which of course returns no results..


You could use some VB code to parse the string and manually generate
your WHERE clause of the SQL statement. Using the InStr() funciton,
you could search for strings such as " OR " and " AND ", and determine
from there how to build out the WHERE clause of the SQL. It's not the
simplest thing to code, but it's certainly possible. If you want to
try this route, we can assist with how the code will look.


Or you might be able to just use multiple text boxes on your form.