Hi...
How to bind recordset to the textbox and combobox using ADO and Update my database.
My database C:\MyDb.mdb; My Table => Table1.
In Table1 I've 10 Fields; 7 tables using TextBox and 3 Tables using comboBox.
hope someone can help me.
Printable View
Hi...
How to bind recordset to the textbox and combobox using ADO and Update my database.
My database C:\MyDb.mdb; My Table => Table1.
In Table1 I've 10 Fields; 7 tables using TextBox and 3 Tables using comboBox.
hope someone can help me.
for textboxes, put this in the Form_Load routine
for combo boxes it is a little differetCode:Set Text1.DataSource = myADO'recordset where you want to store info entered into the combo box
Text1.DataField = "MyField" 'target field name
Code:Set Combo1.DataSource = myADO 'recordset where you want to store info entered into the combo box
Set Combo1.RowSource = myOtherADO 'recordset that contains the data that you want to show in the combo box
Combo1.ListField = "ListField" 'field from myOtherADO that contains the values that you want to show in the combo box
Combo1.BoundColumn = "IdListField" 'field from myOtherADO that contains the values that you want to copy into the recordset myADO
Combo1.DataField = "IdDataField" 'field in myADO where you want to copy the values of the bound column