Hi all,
I'm trying to create a string based on the selections in a
multi-select list box, ie - getting a result such as "a,b,c,d,e". I
have no problems doing this binding together the values of the first
column of the list box (which happens to be the bound column), but
what I need to do is the same thing but with the values of the second
column ...I'm just not sure of how to refer to this second column to
get this working (the end goal is to whack this string into a report
label). I have tried a few things to get it going, but not being a
coder I need some help.
So how would I need to adjust the code below to refer to the second
column of the list-box? ...or as it is not the bound column, do I have
to approach it in a different manner?
For Each varitem In Me.lstMyListBox.ItemsSelected
If MyStr = "" Then
MyStr = "'" & Me.lstMyListBox.ItemData(varitem) & "'"
Else
MyStr = MyStr & ", '" & Me.lstMyListBox.ItemData.Column(varitem)
& "'"
End If
Next varitem
Thanks all