View Full Version : save columns of listbox selected item


RainX
07-23-2007, 08:55 AM
Hi all,

Does anyone know how to get the columns of a listbox selected item and store it to a string? There is no multi-selection so it should be easier. I tried
s$ = Me.list1.selected but it keeps giving me an error

Thanks alot

lead 27
07-23-2007, 10:37 AM
Hi
Are your options for your list box stored in a seperate table?

RoyVidar
07-23-2007, 11:33 AM
You can refer to each column in a listbox or combobox through an index starting with 0. So for instance (immediate pane)

? Me!MyList.Column(0) ' first column
? Me!MyList.Column(4) ' fift column

The bound column, if bound, can be retrieved for instance using

Me!MyList

or

Me!MyList.Value

RainX
07-23-2007, 12:05 PM
^^^ Thanks roy that worked. :D

Take care