Auto Search in Combo

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mahesh123
    New Member
    • Oct 2007
    • 64

    Auto Search in Combo

    Hi Folks,

    I want Help regarding the Auto search in the Combo Box. When I am pressing the characters it will move to the appropraite words in the Combo Box.

    For Example if the Combo Box filled with the Apple, Ant, Boy,Buy

    If press the A then it should go the Apple,Ant,
    If press the An then it should go the Ant.

    Like this to be activate the Auto Search in the Combo.

    Thanks & Regards
    --------------------------
    Mahesh
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by mahesh123
    Hi Folks,

    I want Help regarding the Auto search in the Combo Box. When I am pressing the characters it will move to the appropraite words in the Combo Box.

    For Example if the Combo Box filled with the Apple, Ant, Boy,Buy

    If press the A then it should go the Apple,Ant,
    If press the An then it should go the Ant.

    Like this to be activate the Auto Search in the Combo.

    Thanks & Regards
    --------------------------
    Mahesh

    Well, i dont know exactly what you want, but, the easy way out would be checking the MatchEntry and MatchRequired properties.

    But if you want to look Pro, you can always have an array with all the values, lets say Arr1 (of strings) wit Ant, Apple, Boy, Buy. then just use a TextBox where you'll write your filter, and youre done.

    [CODE=vb]dim i as integer
    for i = lbound(arr1) to ubound(arr1)
    if instr(arr1(i), textbox1.text) <> 0 then combobox2.addit em (arr1(i))
    next[/CODE]

    That'll do

    HTH

    Comment

    Working...