Form vb for Unbound Listbox filtering based on Unbound Textbox
Happy New Year to All!
Trying to filter an unbound listbox of last names based upon the users input in an unbound textbox as they input each character in that textbox. However I'm missing something.
The RecLName field is set as Text
Private Sub txtLName_Change()Dim strLName As String, lngLenLName As Long, lngSortSel As LonglngSortSel = Me.frameExistingParties.Value If IsNull(Me.txtLname.Text) = False Then strLName = Me.txtLname.Text lngLenLName = Len(Me.txtLname.Text) If lngSortSel = 1 Then Me.lstExistingParties.RowSource = "SELECT RecPartyID, RecLName, RecFName, RecMName, RecSufName, RecEntityName, EntityNameType, PartyFullNameFML, PartyFullNameLFM, SortName FROM qrytbl_Parties WHERE RecLName LIKE " & "'" & strLName & "' ORDER BY SortName ASC " Else Me.lstExistingParties.RowSource = "SELECT RecPartyID, RecLName, RecFName, RecMName, RecSufName, RecEntityName, EntityNameType, PartyFullNameFML, PartyFullNameLFM, SortName FROM qrytbl_Parties WHERE RecLName LIKE " & "'" & strLName & "' ORDER BY SortName ASC " End If Else End IfEnd Sub