Auto-Complete

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I'm coding a form that I use for identifying donars to a particular
organization. I need to search for the donars by their last name. Is there
some way I can use a combo box or other control to enter part of the name
and then get a list of everyone else that matches the entered part of the
search string?
Mike
 
Place the unbound combo box on your form (preferably in the Form Header
section), and do this in its AfterUpdate event procedure:

Private Sub cboFilterSurname_AfterUpdate()
Dim strFilter As String
If IsNull(Me.cboFilterSurname) Then
Me.FilterOn = False
Else
strFilter = "[Surname] Like """ & Me.cboFilterSurname & "*"""
Me.Filter = strFilter
Me.FilterOn = True
End If
End Sub
 
Back
Top