I've been attempting to make the DataGridView display a table if the said ComboBox item is chosen, but I can't seem to make it display the rows for one of the tables. After selecting your Search Type, you'll select a sub-category, and then type in the keyword. After typing, click on the Search button, and hoping to get the results. Is there a way for me to do this?
Here's my code snipped so far
Imports System.Data
Imports System.Windows.Forms.BindingSource
Imports System.Data.OleDb
Public Class frmSearch
Private Sub cmbSearchType_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbSearchType.SelectedValueChanged
If cmbSearchType.SelectedItem.Equals("Employees") Then
cmbSubCat.Enabled = True
cmbSubCat.Items.Add("Given Name")
cmbSubCat.Items.Add("Last Name")
DataGridView1.DataSource = EmployeesTableAdapter
EmployeesTableAdapter.Fill()
DataGridView1.Refresh()
End If
End Sub
End Class