Hello Guys,
I am trying to get a listBox to auto-populate or change as I am typing in the textbox. but I type all my selections go away. I placed the code under _Change event AND _KeyPress but nothing. Am I doing this right?
I went online to research some codes but I want to believe it is not THAT complicated?
Here is what I have
I am trying to get a listBox to auto-populate or change as I am typing in the textbox. but I type all my selections go away. I placed the code under _Change event AND _KeyPress but nothing. Am I doing this right?
I went online to research some codes but I want to believe it is not THAT complicated?
Here is what I have
Code:
Private Sub txtSearch_Change()
Dim sqlTraining As String
sqlTraining = "SELECT DISTINCT [Training] FROM QryTrainedEmployees WHERE [Training] LIKE "" * " & Me.txtSearch & " * "" ORDER BY [Training]"
Me.lstTraining.RowSource = sqlTraining
'Me.lstTraining.Refresh
Me.lstTraining.Requery
End Sub