This is the where we enter the value = txtSearchCenter
This is where the result will be = lstPersonnelSearch
Option Compare Database
Private Sub txtSearchCriteria_KeyPress(KeyAscii As Integer)
Dim vSearchString As String
If KeyAscii = vbKeyBack Then
' Handle backspace separately
If Len(Nz(Me.txtSearchCriteria.Value, "")) > 0 Then
vSearchString = Left(Nz(Me.txtSearchCriteria.Value, ""), Len(Nz(Me.txtSearchCriteria.Value, "")) - 1)
Else
vSearchString = ""
End If
Else
' For other keys, including regular characters and Enter key
vSearchString = Nz(Me.txtSearchCriteria.Value, "") & Chr(KeyAscii)
End If
Dim strSQL As String
strSQL = "SELECT * FROM QrySearch WHERE FirstName Like '*" & vSearchString & "*'"
Me.lstPersonnelSearch.RowSource = strSQL
' Optionally refresh the list box immediately
' Me.lstPersonnelSearch.Requery
Me.Refresh
End Sub
This is the where we enter the value = txtSearchC
riteria
This is where the result will be = lstPersonnelSearch
I have tried so many ways to display a query result in a form. The current problem I got is the first letter of a name is deleted when typing the second letter. First letter it filters all the name starts with F and when the second letter O is entered it deletes the F and filter the list box to people whose name starts with letter O. I dont know what is the problem. Please help !

Thanks to @Andre. Below is the update code; Now its working fine.