Private Sub autocus()
Call main()
Con.Open()
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
col.Add(ds.Tables(0).Rows(i)("cust_order").ToString())
Next
txt4.AutoCompleteSource = AutoCompleteSource.CustomSource
txt4.AutoCompleteCustomSource = col
txt4.AutoCompleteMode = AutoCompleteMode.Suggest
Con.Close()
End Sub