Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006
    Posts
    42

    Unanswered: Search for names

    I have a list box called ListClients containing a very long list of names.In order to facilitate searching, is it possible to search with a second control box and while writing the name to see the corresponding initial names on the list box ?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Using a listbox whose bound column = field2
    Code:
    Private Sub Text0_KeyUp(KeyCode As Integer, Shift As Integer)
    
    Dim returnValue As String
    Dim searchCriteria As String
        searchCriteria = "field2 LIKE '" & Me.Text0.Text & "*'"
        returnValue = Nz(DLookup("field2", "myQuery", searchCriteria), "")
        Me.List2.Value = returnValue
    
    End Sub
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •