I have set up a query and it returns correct data when I search for one
thing (I have a drop down box with options). However, I want the user to
be able to choose ANY from the drop down box. How do write the SQL
statement to return ANY records for that particular drop down box? Here is
my example:
1. I have one drop down box for jobs and a second for locations.
2. The user can choose a specific job and specific location.
3. I want them to also be able to select a specific job and ANY for
location, or vice versa.
Any help is appreciated.
Thanks,
Gail
Gail,
one way i got around this:
build your SQL statement for the search in stages using if statements to
break it up..
SQL = "Select * from whatever_table"
if request("job_location") <> "any" then
SQL = SQL + "where [xxxx] = '"& request("job_loc") &"'"
end if
and do another if for the job type too..
should work.
Simon.