Hi guys,

I want to search a customer when i press an alphabet 'a' it should search and show drop down list of all customer those name start with 'a'.

Please please help thanks in advance.

You need to fill the AutoCompleteSource of the textbox with the names of the customers. This can be done by a for loop.

Follow this:
Set the AutoCompleteSource property of the textbox to CustomSource and the AutoCompleteMode property to Suggest.
Then write this in the Load Event of the form.


For i As Integer = 0 to (YourDataSet.Tables("Table").Rows.Count-1)
Next i

You can experiment with the AutoCompleteModes to see which one mostly suits you're requirements.

Edited 6 Years Ago by Hisham-Usif: n/a

i am getting error on (required) is not declared.



If your using that part of code like this:


Then of course you have some difficulties:

What's the name of your textbox....
What's the name of your Dataset....
What's the name of your Table....

Change that and see what's happening with the Error...

Edited 6 Years Ago by Luc001: n/a

This question has already been answered. Start a new discussion instead.