Re: Enter MULTIPLE Items in a Query (e.g. [Name:] ??



Dear Kev:

Duane's response is a good one, and is simple. It is not the most powerful
or useful one.

A good approach would be to create a multi-select list box of all the first
name values in the table. The user could then select every one that is
desired. An advantage to this is that the user has the possibility of
seeing all the first names in the table. Sometimes this can be very useful
in helping the user to realize what kinds of spellings abound. Maybe
someone told the user to look for "John". Will the user know to look for
"Jon" as well?

When creating software to search for something, it is best not to have users
spell the thing they are looking for. Many user aren't that good at this
anyway. Picking something from a list is easier and more likely to be
successful.

An additional big advantage occurs if the user wishes to repeat the search,
but adding or deleting one or more of the previous selections. With a
prompt, the user will have to retype everything. With a control, the user
can just click to add or remove selections.

Once the selections have been made, the user clicks a command button. The
code you write there builds the SQL from the selections made.

Tom Ellison


"kev100 via AccessMonster.com" <u16246@uwe> wrote in message
news:5a07b45996187@xxxxxx
> I've got a query set up that will return all the entries relating to a
> particular Name.
>
> The names are stored in the "Name" field.
>
> In the Query, I simply used the [Enter First Name:] so that the user is
> prompted.
>
>
> Entering 1 name works great.
>
> However, what statement do I use in the Query to allow 1 OR More to be
> entered....so that it will return for one or all (basically Name1 or Name2
> or
> Name3.......etc)?
>
> I've tried just entering "John" or "Mary" or "Tom" into the existing
> prompt,
> but it doesn't seem to work.
>
> Thanks
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200601/1


.