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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Console.Beep() 11
Auto fill not working 2
uint32 in Access 2007 8
List help! 1
Search Form to search everything 1
Referring to text control in a form 2
Error 2147352567 2
search for multiple records in a form 4

Back
Top