Multiple search values and parameterised query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear Access Users,

How do I input multiple search values into a parameterised SELECT query?
For example, I would like retrieve records that matches a list of values
provided by the user.

Kind Regards
Charles
 
a single parameter in a query can only accept a single entry. IOW, you cant
have a city prompt and enter "Dayton, Cleveland, Akron"

If you want to have multiple parameters, then just add them to the grid as
needed.
 
Or you could kludge this with
SELECT TableA.*
FROM TableA
WHERE Instr("," & [Enter Cities separated by commas with no spaces] & ",",
"," & [CityField] & ",")>0;
 

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

Back
Top