Private Sub autocus()
Call main()

Dim cmd As New SqlCommand("SELECT cust_order FROM Inventory", Con)

Dim ds As New DataSet
Dim da As New SqlDataAdapter(cmd)
da.Fill(ds, "My List") 'list can be any name u want

Dim col As New AutoCompleteStringCollection
Dim i As Integer
For i = 0 To ds.Tables(0).Rows.Count - 1
txt4.AutoCompleteSource = AutoCompleteSource.CustomSource
txt4.AutoCompleteCustomSource = col
txt4.AutoCompleteMode = AutoCompleteMode.Suggest

End Sub

Reverend Jim commented: No context. Don't know if this is a question or sample code. -2

Is this a sample of code that works or is it a piece of code that you are having a problem with?

If it is the first then you should explain what it does and how. If it is the second then you should explain what you are trying to do and what you are having a problem with.

Didn't intend to ding your rep. If you make another post here I'll offset it with a positive vote.