Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am crating a vb project using combobox. I need to show the values from database containing the letter i type in combobox.
for example

i have a database in msaccess containing a table product.
in that table i stored the products like,

Oil filter
Tools Kit
Spange
Iorn Stock



if i press " K " in combobox the combobox should show only

Tools Kit
Iorn Stock

If i press " T " in combobox the combobox should show only

Oil Filter
Tools Kit

What I have tried:

I tried many options in the internet but nothing is working.
Posted
Updated 13-Jul-19 20:15pm

1 solution

This is called "autocomplete", but the standard ComboBox won't do what you want directly - you need to do some work on it. Not too much though: Autocomplete combobox match any part of string not only beginning string.[^] - the code sample is in C#, but it's all pretty obvious and if you really can't cope then Code Converter C# to VB and VB to C# – Telerik[^] should help.

This is assuming that you mean VB, not VB6 - they are very different, and nobody in their right mind is designing VB6 apps from scratch: it went out the window when .NET 1.0 was released all the way back in 2002!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900