hi guy's
-----------------------------
my project have a database (access) with 3 table ...
how to show field from database (ID or Name of table 1) in comboBox ?
then insert in table B ...!
thank's
How to show field from access in comboBox
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Guest UserRank #258 · 9.8K pointsPosted Aug 11, 2014, 8:09 PM EDT
Guest UserRank #258 · 9.8K pointsPosted Aug 12, 2014, 7:12 PM EDT
but you've to write code when user select value in combo box it should be inserted into new table.
something like this shall work for you:
da.newRow(combo1.value);
da.insert();
i may be wrong syntactically but algorithm is right
ghasem deh171 pointsPosted Aug 11, 2014, 9:55 PM EDT
this code is OK
DataTable table = new DataTable();
string sql = "Select New from Album";
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter(sql, con);
da.Fill(table);
table.Rows.Add(" ");
comboBox1.DataSource = table;
comboBox1.DisplayMember = "New";
comboBox1.ValueMember = "New";
comboBox1.SelectedValue = " ";