muliselect listbox

david444

Registered User.
Local time
Today, 21:47
Joined
Mar 11, 2003
Messages
12
how do you get several values from a multislect listbox t appear in a field on the same form (maybe sepeerated by commas)
 
You'll need to use Visual Basic to loop through all entries in the listbox and build up a string that stores all those that are selected.

I'm sure I've posted some code on how to do this in the past.
 
In fact, here's the very thread.
 
Dim Msg, Style, Title, Response, MyString
List13.SetFocus
Dim intItemNum As Integer, strMsg As String

intItemNum = 0
For intItemNum = 0 To List13.ListCount - 1
If List13.Selected(intItemNum) Then
If strMsg = "" Then
strMsg = (List13.Column(1, intItemNum))
Else
strMsg = (strMsg) & " , " & (List13.Column(1, intItemNum))

End If
End If
Next intItemNum

Me.Text40 = strMsg
 

Users who are viewing this thread

Back
Top Bottom