Hello,
I've been working with VB6 and ADO objects for a while. But there are a few small problems that i still haven't been able to solve.
I've got an adodc controller, textbox and an ADO combobox.
All i want to do is to scroll the combobox and select an item(itemNo) and the related info(ItemDesc) should appear in the textbox.
The problem i've got is that nothing happends with the textbox when I select something from the combo box. However, if i use the scroll buttons on the ADODC controller it updates the textbox.
The code i've written looks like this:
' code for setting up a connection object
xxxx
xxxx
strSQL = "select itemNo, itemDesc from Item"
rstItem.Open strSQL, CnnAdo, adOpenDynamic
' bind the recordset to the adodc controller
Set Me.adcItem.Recordset = rstItem
' bind the combo box to the adodc controller
Set cboItem.DataSource = adcItem
cboItem.DataField = "ItemNo"
Set cboItem.RowSource = adcItem
cboItem.ListField = "ItemNo"
' bind textbox
Set txtItemDesc.DataSource = adcItem
txtItemDesc.DataField = "ItemDesc"
I don't know what's wrong with this bit of code, but there must be some minor changes that i have to do.
Thanks
Erik L