This is a routine that works perfectly and resides within a form called: frmCNMaster
In frmCNMaster I have a List box called: lstBox
I have a control button called: cmdFilter
Private Sub cmdFilter_Click()
‘ This one allows multiple selections
Dim varItem As Variant
Dim strWhere As String
For Each varItem In Me.lstSelect.ItemsSelected
strWhere = strWhere & “, ” & Me.lstSelect.ItemData(varItem)
Next
If Not strWhere = “” Then
strWhere = Mid(strWhere, 3)
strWhere = “F00_Function In (” & strWhere & “)”
Me.Filter = strWhere
Me.FilterOn = True
End If
End Sub
I have a 2nd command button called: FKS_99
Private Sub FKS_99_Click()