Kim,
The description can be displayed on your subform in one of two ways--either
the subform is based on a query that contains the Description field from the
Products table, or it uses the Column property of a combo or list box. In
either case, the control is not bound to the Description field of your
InvoiceItems table.
In *most* Invoice applications, you don't need the Description field because
this field is static--that is, a product is typically not "Bunch of Bananas"
this week and "Group of Grapes" the next. In this case, you would obtain the
value of the Description field from a query whenever you need it for printing
an invoice or other report. But not knowing the types of products you are
selling, you may have a motive to capture the Description *at the time of the
order*, so that it is specific to each particular order. More importantly,
you certainly have this motive for the unit price field, which will change
with time.
To handle these situations, include the Description and UnitPrice fields in
the RowSource of your combo or list box. Then set the ControlSource of two
textboxes to the Description and UnitPrice fields, respectively, of the
InvoiceItems table. Note that this may require you to change the query
underlying the subform. Then use the AfterUpdate event of the list or combo
box to set the values of the textboxes:
Me![txtDescription] = Me![MyComboOrListbox].Column(x)
Me![txtUnitPrice] = Me![MyComboOrListbox].Column(y)
where x and y are the column numbers from the combo box (starting from 0).
Hope that helps.
Sprinks