Are you talking about "Type Ahead Ability" or are you talking about running a query against records based upon input?
Type Ahead Ability
Good LuckCode:Option Explicit Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const LB_FINDSTRING = &H18F 'for listboxes Private Const CB_FINDSTRING = &H14C 'for comboboxes Private Sub Form_Load() Combo1.AddItem "this is a test", 0 Combo1.AddItem "so is this", 1 Combo1.AddItem "but not this", 2 Combo1.AddItem "Well really it is", 3 Combo1.AddItem "in fact", 4 Combo1.AddItem "all of this", 5 Combo1.AddItem "is a test", 6 End Sub Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer) Dim Idx As Long, TempString As String If KeyCode < 32 Or KeyCode > 126 Then Exit Sub If KeyCode = vbKeyBack Then Exit Sub TempString = Combo1.Text Idx = SendMessage(Combo1.hwnd, CB_FINDSTRING, -1, ByVal TempString) If Idx <> -1 Then Combo1.ListIndex = Idx Combo1.SelStart = Len(TempString) Combo1.SelLength = Len(Combo1.Text) - Len(TempString) Else Combo1.Text = TempString Combo1.SelStart = Len(TempString) End If End Sub




Reply With Quote