Hi
i've got the following code. I won't know how mnay items will be in List0, because it gets added to frequently. therefore i can never say how many cases I require (in the example below i have used 5) but it might be 12, it might be 14 etc. How can i match the number of case statements to the number of items in the List Box. the items are held within tblKeyStrats.
thanks
rich
i've got the following code. I won't know how mnay items will be in List0, because it gets added to frequently. therefore i can never say how many cases I require (in the example below i have used 5) but it might be 12, it might be 14 etc. How can i match the number of case statements to the number of items in the List Box. the items are held within tblKeyStrats.
thanks
rich
Code:
Dim strStrat As String
Select Case Me.List0.Value
Case 1
strStrat = "=1"
Case 2
strStrat = "=2"
Case 3
strStrat = "=3"
Case 4
strStrat = "=4"
Case 5
strStrat = "=5"
Case Else
strStrat = ">0"
End Select
strFilter = "[RiskStrat] " & strStrat