welcome!
ComboBox控件如何做到Access中ComboBox的自动匹配列表项目?要求代码
http://www.csdn.net/expert/TopicView.asp?id=158609

解决方案 »

  1.   

    !那是一个增量查询的例子,看这个关键的代码:
    Dim iStart As Integer
       Dim sString As String
       Static iLeftOff As Integer
       
       
       iStart = 1
       iStart = Combo1.SelStart
       If iLeftOff <> 0 Then
          Combo1.SelStart = iLeftOff
          iStart = iLeftOff
       End If
       sString = CStr(Left(Combo1.Text, iStart))
       Combo1.ListIndex = SendMessage(Combo1.hwnd, CB_FINDSTRING, -1, ByVal CStr(Left(Combo1.Text, iStart)))
       If Combo1.ListIndex = -1 Then
          iLeftOff = Len(sString)
          Combo1.Text = sString
          
       End If
       Combo1.SelStart = iStart
       iLeftOff = 0注意CB_FINDSTRING!
    我的意思不在于找到所要的数据,而是做到可以随意拉动的效果,