Selecting multiple options in list box and sending back to table

  • Follow


Hi All,

I have created a small database, for recording details about suppliers. Some 
our suppliers offer more than one service, so i thought the best way to 
select multiples would be to create a list box.

I have changed the properties to allow me to select multiple options, 
however cannot get the selection to save back to the data table.

Any help is much appreicated.
0
Reply Utf 10/19/2007 9:54:36 AM

What about something like

Dim vRow As Variant 

With Me.YourListBoxName 
        For Each vRow In .ItemsSelected 
               'Do what you'd like with the selected item.
        Next vRow 
End With 
-- 
Hope this helps,

Daniel P






"Cwbviper" wrote:

> Hi All,
> 
> I have created a small database, for recording details about suppliers. Some 
> our suppliers offer more than one service, so i thought the best way to 
> select multiples would be to create a list box.
> 
> I have changed the properties to allow me to select multiple options, 
> however cannot get the selection to save back to the data table.
> 
> Any help is much appreicated.
0
Reply Utf 10/19/2007 12:07:01 PM


You will not be able to save multiple selections in the field with a bound 
list box.
If you are wanting to put individual items from the list box into multiple 
fields, you will need to use bound controls for each of the fields and 
programmatically populate them using the selections from the list box.  This, 
however, does not sound like a good plan.
-- 
Dave Hargis, Microsoft Access MVP


"Cwbviper" wrote:

> Hi All,
> 
> I have created a small database, for recording details about suppliers. Some 
> our suppliers offer more than one service, so i thought the best way to 
> select multiples would be to create a list box.
> 
> I have changed the properties to allow me to select multiple options, 
> however cannot get the selection to save back to the data table.
> 
> Any help is much appreicated.
0
Reply Utf 10/19/2007 2:18:00 PM

2 Replies
479 Views

(page loaded in 0.149 seconds)


Reply: