title: Autocomplete with a Textbox
body: <p>I am trying to add an autocomplete box to my winform.</p>
  
  <p>The <code>GetDatabaseContent()</code> works fine when I apply it to a <code>combo box</code> but I want to add it to a <code>textbox</code>.</p>
  
  <p>The issue my current code is that is brings the contents of my <code>Datatable</code> as a single line rather than a list.</p>
  
  <p>Any help would be great.</p>
  
  <pre><code>Private Sub frmUser_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  
      Dim mystring
  
      Dim dt As DataTable = GetDatabaseContent()
      mystring = FetchTable(dt)
      Dim newstr As New AutoCompleteStringCollection
      newstr.Add(mystring)
      txtbox.AutoCompleteCustomSource = newstr
  
  
  End Sub
  
  Function FetchTable(dt As DataTable)
      Dim mystring = ""
      For Each dr As DataRow In dt.Rows
          mystring &amp;= dr.Item(0).ToString
      Next
      Return mystring
  End Function
  </code></pre>