I have a form with a listbox(simple) and a command button on it. That on the click button I have the code:
Dim strWhere
strWhere = ""
Dim intI As Integer
With Me!lstSupChoice
For intI = 0 To .ListCount - 1
If .Selected(intI) Then
If strWhere = "" Then
strWhere = "OPTIONS = '" & .ItemData(intI) & "'"
Else
strWhere = strWhere & " or OPTIONS = '" & .ItemData(intI) & "'"
End If
End If
Next intI
End With
DoCmd.OpenReport "SupReport", acViewPreview, , strWhere
Which pulls more the one option of to the report. Is there a way to get them to stay together like:
xlt trim
spare tire
blue
Right now their space out like
xlt trim
spare tire
blue
Thanks
irene
Dim strWhere
strWhere = ""
Dim intI As Integer
With Me!lstSupChoice
For intI = 0 To .ListCount - 1
If .Selected(intI) Then
If strWhere = "" Then
strWhere = "OPTIONS = '" & .ItemData(intI) & "'"
Else
strWhere = strWhere & " or OPTIONS = '" & .ItemData(intI) & "'"
End If
End If
Next intI
End With
DoCmd.OpenReport "SupReport", acViewPreview, , strWhere
Which pulls more the one option of to the report. Is there a way to get them to stay together like:
xlt trim
spare tire
blue
Right now their space out like
xlt trim
spare tire
blue
Thanks
irene