Multiselect parameter query

S

Scott

I need to enter more than one entry for parameter query. Can someone advise
me how to accomplish it.

Thanks,

Scott
 
A

Allen Browne

A parameter will only pop up its dialog once.

If you know how many parameters you might need, you could use multiple
parameters on the one field - criteria such as:
[Enter first value] Or [Enter another value] Or [Enter a 3rd]

Realistically, it gets stale pretty fast answering each parameter every
time. Much better to use a form where the user can use any number of boxes
they need, and leave the others blank. You can then set up multiple unbound
text boxes such as:
Surname: [ ]
or [ ]
or [ ]
and just itnore the boxes the user leaves blank. Alternatively, you can use
a multi-select list box so the user can select multiple values. Ultimately,
you create a string to use as the WhereCondition for OpenReport, as the
Filter for your form, or even as the SQL of a QueryDef.

For the techniques to build the string on the fly from the controls the
where the user entered something, see:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

For an example of the multi-select list box, see:
Use a multi-select list box to filter a report
at:
http://allenbrowne.com/ser-50.html
 

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

Similar Threads


Top