Hi, I have two simple select list boxes , lstType and lstPriority I am using as part of the Where Clause.
I can pick up all the itemsSelected from lstType but can only pick up the first item selected from LstPriority. I believe I need to do another For-Next with the second list box using VarItemP but don't know how to include it.
Dim varItem As Variant
Dim VaritemP As Variant
If (lstType.ItemsSelected.Count = 0) Then Exit Sub
For Each varItem In lstType.ItemsSelected
StrsqlWhere = "Where " & "([tblSystem].[Sys]) = '" & (lstType.Column(0, varItem)) & "' and " & _
"[tblListType].[priority] = '" & (lstPriority.Column(0, VaritemP)) & "' OR "
Next varItem
Any help would be appreciated.
Thanks, Dan
I can pick up all the itemsSelected from lstType but can only pick up the first item selected from LstPriority. I believe I need to do another For-Next with the second list box using VarItemP but don't know how to include it.
Dim varItem As Variant
Dim VaritemP As Variant
If (lstType.ItemsSelected.Count = 0) Then Exit Sub
For Each varItem In lstType.ItemsSelected
StrsqlWhere = "Where " & "([tblSystem].[Sys]) = '" & (lstType.Column(0, varItem)) & "' and " & _
"[tblListType].[priority] = '" & (lstPriority.Column(0, VaritemP)) & "' OR "
Next varItem
Any help would be appreciated.
Thanks, Dan