S
Secret Squirrel
I'm using the following code to pull the values from my listbox and enter
them into a textbox. How do I get rid of the "OR" after the last item is
selected?
This is an example of what is showing up in my textbox:
1 OR 2 OR 3 OR 4 OR
Here is the code I'm using:
Dim i As Integer
Dim strMultiValue
For i = 0 To SkillList.ListCount - 1
If SkillList.Selected(i) Then
strMultiValue = strMultiValue & SkillList.Column(0, i) & " OR "
End If
Next i
If Len(strMultiValue) > 2 Then
strMultiValue = Left(strMultiValue, Len(strMultiValue) - 1)
Me.Text494.Value = strMultiValue
Else
Me.Text494.Value = Null
End If
them into a textbox. How do I get rid of the "OR" after the last item is
selected?
This is an example of what is showing up in my textbox:
1 OR 2 OR 3 OR 4 OR
Here is the code I'm using:
Dim i As Integer
Dim strMultiValue
For i = 0 To SkillList.ListCount - 1
If SkillList.Selected(i) Then
strMultiValue = strMultiValue & SkillList.Column(0, i) & " OR "
End If
Next i
If Len(strMultiValue) > 2 Then
strMultiValue = Left(strMultiValue, Len(strMultiValue) - 1)
Me.Text494.Value = strMultiValue
Else
Me.Text494.Value = Null
End If