Hi, I want to have a combo box which the user can filter down the available options in a multiselect list box.
I have tried to use the below code but doesn't work
I have tried to use the below code but doesn't work
VBA Code:
Private Sub cbo_filterProvider_Click()
Dim strRS As String
' Filter the list box appropriately based on the combo box selection(s)
If Me.cbo_filterProvider.ListIndex >= 0 Then strRS = strRS & " AND ProviderID = " & Me.cbo_filterProvider
'ADD FILTER TO QUERY
strRS = "SELECT qry_studentsExtended.StudentID, qry_studentsExtended.StudentName FROM qry_studentsextended " & strRS
'ADD ORDER BY CLAUSE
strRS = strRS & " ORDER BY qry_studentsExtended.Last Name;"
Me.lst_Students.RowSource = strRS
Me.lst_Students.Requery