List Box - Select More than one Item

S

Simon

I have a form that has a list box,

What ever is selected in the list box the Query is based on, However i
would like to secect 2 items or more from the List Box then base the
query on all the items select

Is there a way to select more than one item from list box

Thansk

SImon
 
M

Mr. B

Simon,

The simple answer to your question is, "Yes". A listbox has a "Multi
Select" property. The default value for this property is "None". The other
values for this property are: "Simple", when selected allows users to select
multiple items by clicking each item with the mouse or spacebar, and
"Extended", when selected allows items to be selected by holding down the
SHIFT key and clicking items with the mouse, etc. (place your cursor in the
Multi Select property of your list box and press F1 for a full explination.

However, with that answered, you should know that just having multiple items
selected does not mean that your query will work to return records based on
all of the items selected. You will instead need VBA code to find and use
the selected values in your query.

There are many threads here that already discuss how to walk through the
selection made in a listbox.

HTH
Mr. B
(askdoctoraccess dot com)
 

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

Top