G
Guest
Hi All,
I know what is wrong with my code but I don't know how to fix it. It's
better to explain what is wrong with it in an example than to try to explain
it.
If a user wants to see all the phone calls for Division1 with a priority of
1 or 2 the results that are given are calls for Division1 with a priority of
1 and ALL the divisions with a priority of 2.
This is the Where string shown in my Debug Window:
([BUS Unit/Div] = "Division1") and ([Priority] = 1) or ([Priority] = 2)
This is my code for the list box:
With Me.lstPriority
For Each varItem In .ItemsSelected
If Not IsNull(varItem) Then
strWhere = strWhere & " ([Priority] = " & .ItemData(varItem) & ") or "
End If
Next
End With
Any suggestions on how to fix this?
Thank you,
Linda
I know what is wrong with my code but I don't know how to fix it. It's
better to explain what is wrong with it in an example than to try to explain
it.
If a user wants to see all the phone calls for Division1 with a priority of
1 or 2 the results that are given are calls for Division1 with a priority of
1 and ALL the divisions with a priority of 2.
This is the Where string shown in my Debug Window:
([BUS Unit/Div] = "Division1") and ([Priority] = 1) or ([Priority] = 2)
This is my code for the list box:
With Me.lstPriority
For Each varItem In .ItemsSelected
If Not IsNull(varItem) Then
strWhere = strWhere & " ([Priority] = " & .ItemData(varItem) & ") or "
End If
Next
End With
Any suggestions on how to fix this?
Thank you,
Linda