C
Corey-g via AccessMonster.com
Hi All,
I have a form (frmMain) and subform (sfrmSub), both are bound to the
appropriate tables, and they are linked on the key field "OrderID" (subform
control is named Subform). In the main form I have a combo box (bound to a
query) and button that I would like to use to have the user select the
desired item - and click the button. This would then add the item to the
subform using the following code:
Forms![frmMain]![Subform]!txtPRODUCT_NUMBER = Me.cboProducts.Column(1)
Forms![frmMain]![Subform]!txtPRODUCT_DESCRIPTION = Me.cboProducts.Column(2)
The problem is that I get a runtime error '2448' You can't assign a value to
this object. I have the allow additions and the data entry properties of the
subform set to Yes.
Any ideas on what I'm doing wrong?
TIA,
Corey
I have a form (frmMain) and subform (sfrmSub), both are bound to the
appropriate tables, and they are linked on the key field "OrderID" (subform
control is named Subform). In the main form I have a combo box (bound to a
query) and button that I would like to use to have the user select the
desired item - and click the button. This would then add the item to the
subform using the following code:
Forms![frmMain]![Subform]!txtPRODUCT_NUMBER = Me.cboProducts.Column(1)
Forms![frmMain]![Subform]!txtPRODUCT_DESCRIPTION = Me.cboProducts.Column(2)
The problem is that I get a runtime error '2448' You can't assign a value to
this object. I have the allow additions and the data entry properties of the
subform set to Yes.
Any ideas on what I'm doing wrong?
TIA,
Corey