>I have a grid that I am trying to display invoice detail records in. My columns are:
>ItemCode, ItemDesc, Qty, Units, Price and Extended Amt.
>ItemCode is a 2-column combo box (0 - Dropdown) with RowSource = PRODUCTS.ItemCode,ItemDesc (so user sees a list of part numbers and descriptions). The grid's ItemDesc, Units & Price columns all point to corresponding fields in my PRODUCTS lookup table. ItemDesc and Units are really just informational - they do not need to be saved in the InvDetail table (invoice line items). But, I want the Price column to display the corresponding PRODUCTS.Price amount *and* update InvDetail.Price with this same value (from PRODUCTS). So, I assume that the Price column's ControlSource should be InvDetail.Price - right? Same for Price's Text1 ControlSource? Also, how do I initially populate the Price column with the matching PRODUCTS.Price value?
Yes, Price's column controlsource should be InvDetail.Price. You don't need to set textbox controlsource in the designer. Now, are you using buffering and tables directly?
In your combobox valid event you may put replace price with Products.Price in InvDetail. This would update price column. You may have to call colPrice.refresh() method, though I'm not certain it's necessary.
If it's not broken, fix it until it is.
My Blog