hi
i have created two combo boxes which contain locations and floors.
After selecting the location from the first combo need to filter the floors allocated to the selected location, to the second combo. i have allocated floors to locations in another table called floor allocate. can somebody pls help
//---Combo Box comLocationName
string Q2 = "SELECT LOCNAME FROM LOCATION ORDER BY LOCNAME ";
CommonAdapter.SelectCommand = new OleDbCommand(Q2, ConnectMe);
CommonAdapter.SelectCommand.ExecuteNonQuery();
DataSet DS2 = new DataSet();
CommonAdapter.Fill(DS2, "D");
DataTable DSTbl2 = DS2.Tables["D"];
comLocationName.DataSource = DS2.Tables[0];
comLocationName.DisplayMember = "LOCNAME";
comLocationName.ValueMember = "LOCNAME";
//---Combo comFloorName
string Q1 = "SELECT FLOORNAME FROM FLOOR ORDER BY FLOORNAME ";
CommonAdapter.SelectCommand = new OleDbCommand(Q1, ConnectMe);
CommonAdapter.SelectCommand.ExecuteNonQuery();
DataSet DS1 = new DataSet();
CommonAdapter.Fill(DS1, "D");
DataTable DSTbl1 = DS1.Tables["D"];
comFloorName.DataSource = DS1.Tables[0];
comFloorName.DisplayMember = "FLOORNAME";
comFloorName.ValueMember = "FLOORNAME";