You will need an SQL query something like This :-
SELECT field1, field2, field3 FROM yourTable WHERE team = @selectedTeam;
[Edited]
You are going to have to put the SQL in a query to the database in a method of it's own, and call this method whenever the combo selected item is changed. Something like this:-
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
GetTeamMembers(comboBox1.SelectedText);
}
void GetTeamMembers(string subTeam)
{
using (OleDbConnection con = new OleDbConnection("yourConnectionString"))
{
OleDbCommand cmd = new OleDbCommand("Select * from finaltickettable where Subteam = @subTeam", con);
cmd.Parameters.AddWithValue("@subTeam", subTeam);
OleDbDataReader dr = cmd.ExecuteReader();
List<string> teamMembers = new List<string>();
while (dr.Read())
{
comboBox2.Items.Add((string)dr[0]);
}
}
}
Please not this is just an example. Ideally, you should never have data access code in your user interface. Prefereably you should have a class that describes a Team and the data access method should be in that class and returns all the team members in that team.
[/Edited]