List box with multi-select?

M

mAbZ

hi

I'm a .Net programmer who all of the sudden needs to do a litte work in
Access 2003. It's quite straight forward, except for one thing:

how do I do a ListBox with multi-select functionality?
Is it possible at all in Access?

thx
 
D

Dirk Goldgar

In
mAbZ said:
hi

I'm a .Net programmer who all of the sudden needs to do a litte work
in Access 2003. It's quite straight forward, except for one thing:

how do I do a ListBox with multi-select functionality?
Is it possible at all in Access?

The standard Access listbox control has a MultiSelect property that can
be set to None, Simple, or Extended. If set to None, the control
doesn't allow multiselect. The other options allow multiselect with
slightly different behavior.

A listbox in multiselect mode cannot be bound to a field, and its Value
property is always Null. You have to use code to process the items in
the control's ItemsSelected collection, or check each row's Selected
property.

In single-select mode, a listbox can be bound to a field, and its Value
property is the value of the bound column for the selected row.
 
M

mAbZ

I've found it, thanks! :)

I will have to do one db INSERT for each selected value anyway
so writing some code is not a problem. Great!
 
P

Pete

On the toolbox select listbox. Right click and select properties. Under
multiselect select simple or extended. Pete
 
S

skhusal

Can you share what your code looks like - I have a similar need for multiple
select choices in a list box... Thanks.
 
Top