dm5085
Technical User
- Jul 15, 2004
- 17
I have a form that has a multi-select list box. I've succeeded passing the string value to a query but my query won't pull any records I suspect because I can't figure out how to delete the last "OR" from the string.
Here's my sub:
Private Sub lstStatus_AfterUpdate()
Dim AwardStatus As Variant
Dim strAwardSel As String
Dim AwardList As String
For Each AwardStatus In Me![lstStatus].ItemsSelected()
If Len(strAwardSel) <> 0 Then strAwardSel = strAwardSel
strAwardSel = strAwardSel & Me![lstStatus].Column(0, AwardStatus) & " OR "
' & "," & Me![lstStatus].Column(1, AwardStatus)
Next AwardStatus
Me.AwardList = strAwardSel
End Sub
Can anyone help? I know there are dozen's of threads out there but I couldn't find one to address this.
Thanks!
Here's my sub:
Private Sub lstStatus_AfterUpdate()
Dim AwardStatus As Variant
Dim strAwardSel As String
Dim AwardList As String
For Each AwardStatus In Me![lstStatus].ItemsSelected()
If Len(strAwardSel) <> 0 Then strAwardSel = strAwardSel
strAwardSel = strAwardSel & Me![lstStatus].Column(0, AwardStatus) & " OR "
' & "," & Me![lstStatus].Column(1, AwardStatus)
Next AwardStatus
Me.AwardList = strAwardSel
End Sub
Can anyone help? I know there are dozen's of threads out there but I couldn't find one to address this.
Thanks!