title: Populate Combobox with Access Table Names
body: <p>I have a datatable that I am able to populate from my access database without a problem but I want to add a step in it:</p>
  
  <pre><code>    private void button_Open_Click(object sender, EventArgs e)
      {
          var open = new OpenFileDialog
                      {
                          InitialDirectory = "c:\\",
                          Filter = @"Access Files (*.mdb)|*.mdb|All files (*.*)|*.*",
                          FilterIndex = 0,
                          RestoreDirectory = true,
                          Multiselect = false
                      };
          open.ShowDialog();
  
          if (string.IsNullOrEmpty(open.FileName)) return; 
  
          try
          {
              var con = new OleDbConnection();
              con.ConnectionString = "Provider= microsoft.jet.oledb.4.0; data source = " + open.FileName;
              con.Open();
  
              var dt = new DataTable();
              var da = new OleDbDataAdapter("select * from tblCustomerAccount", con);
              da.Fill(dt);
              dataGridView_AccessDatabase.DataSource = dt.DefaultView;
              con.Close();
          }
          catch (OleDbException ex)
          {
              //get the error message if connection failed
  
              MessageBox.Show("Error in connection ..." + ex.Message);
          }
  
  
      }
  </code></pre>
  
  <p>I'd like to add in there a combobox that is populated with the table names then, off the selection of the combobox, the datatable is populated.</p>
  
  <p>How do I populate the combobox with the table names?</p>
  
  <p>Thanks!</p>