Selecting more than one option from a list box

  • Thread starter Thread starter Nadia
  • Start date Start date
N

Nadia

I am trying to build a database that can select mayn
different subjects from a drop down box- a selection of
metadata if you like that can be used later to run
reports.

what is the query or command that I need to use to allow
more than one selection to be made from a list box?

thank you
 
Nadia said:
I am trying to build a database that can select mayn
different subjects from a drop down box- a selection of
metadata if you like that can be used later to run
reports.

what is the query or command that I need to use to allow
more than one selection to be made from a list box?

The ListBox has a property called "Multi Select." from which you can choose "None"
(the default), "Simple", or "Extended".
 
Use the Multiselect property of a list box to allow
multiple selections (see example).

Dim foo As ListBox
Let foo.MultiSelect = 2

Regards,
Adam
 
Hi,

You will have to tie this to a command button but it
should work something like this:

dim itemSelected as integer

dim valueSelected as (whatever your field type is for the
data)

With Me!YourControlName
For item_selected = 0 To .ListCount - 1
If (.selected(item_selected)) Then
...dosomething here...
endif
Next item_selected

End With

If your grabbing information for a report to be generated
later, you will probably need to put whatever data you
need into a temp table that is cleared each time this
procedure is executed.

I hope this helps!

Kevin
 
Back
Top