Hi, in VB8, I request your help to add the product field to a list box and when i start type a charactor of a sentence, the list box shows the relevant sentence to picked up from the list box.

Try this

ListBox1.Items.AddRange({"the", "quick", "brown", "fox", "jumped", "over"})

TextBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
TextBox1.AutoCompleteSource = AutoCompleteSource.CustomSource
TextBox1.AutoCompleteCustomSource.Clear()

For Each item In ListBox1.Items
    TextBox1.AutoCompleteCustomSource.Add(item)
Next

Just remove the first statement to use the items you already have in your listbox. There are several different AutoCompleteMode(s). Just pick the one that suits you best.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.