Search Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I currently have a search textbox and that on exit of the field is updates
my list to what was typed in the field. This is what i have at the moment.

Private Sub txtsurname_Exit(Cancel As Integer)
Me.List.RowSource = "SELECT memberstable.CustomerID,
memberstable.MembershipNo, memberstable.Surname, memberstable.[Given Names],
memberstable.Suburb, memberstable.Resignation, memberstable.Deceased FROM
memberstable WHERE memberstable.surname Like '*" & Me.txtsurname & "*' and
(((memberstable.Resignation)=False) AND ((memberstable.Deceased)=False))ORDER
BY memberstable.Surname;"
End Sub

I now want to change it so that the list will automatically update the
search after each key stroke. Rather than waiting until exiting the field.

It this possbile and how do i do it.

Thanks
 
Moved it over the the OnChange Event and i cant get it to work. It looks
like the list box is refeshing but its not narrowing down the names in the
list at all.
 
Back
Top