Incremental Search Using Combo Box in VB 4.0 (32-bit)

How do I implement a incremental search thru entering
text in the combo box in VB 4.0 (Something similar to
MS Access Combobox feature) ?  I have problem setting
the text of the combo box to the selected listitem's text
when the drop-down list of the combo box is visible.
I am not using Data Control , hence DBCombo is not a
solution.
Please help!  
cccnemAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
milton042297Connect With a Mentor Commented:
Use the "DBCombo Control", you can get the definitions on VB Help.
0
 
cccnemAuthor Commented:
Edited text of question
0
 
cccnemAuthor Commented:
I am not using Data Control in this instance, so DBCombo cannot solve the problem. Any other alternative?
0
 
cccnemAuthor Commented:
I am not using Data Control in this instance, so DBCombo cannot solve the problem. Any other alternative?
0
 
milton042297Commented:
At the begginig of the code put some thing like this...

*****************************************************************
Set SnapProcura = DB.CreateSnapshot("select DISTINCT[Titulo] from TAB_Procura ORDER BY Titulo")
    If SnapProcura.RecordCount > 0 Then
        While Not SnapProcura.EOF
            CmbPalavra.AddItem SnapProcura("Titulo")
            SnapProcura.MoveNext
        Wend
    End If
*****************************************************************
This code load the combo.

At the "Change" Event of the combo put something like this code...
*****************************************************************
Do While i < CmbPalavra.ListCount
       
     Expressao = Left$(CmbPalavra.List(i), Len(CmbPalavra.Text))
       
     If UCase$(CmbPalavra.Text) <= UCase$(Expressao) Then
            LstPalavra.TopIndex = i
            'LstPalavra.ListIndex = i
           
            i = 0
            Exit Do
      End If
      i = i + 1
Loop

*****************************************************************
This code make the search of the combo box.

good luck
0
All Courses

From novice to tech pro — start learning today.