davesmith202
Employee of Access World
- Local time
- Today, 22:50
- Joined
- Jul 20, 2001
- Messages
- 522
I have frmOrders and fsubItems (as a subform on frmOrders).
When I pick an item from the combobox on the datasheet subform, it
populates description, price and total.
Then it attempts to store an OrderTotal value on the main form.
My code on the afterupdate event of the item combobox is...
Private Sub Product_AfterUpdate()
Description = Product.Column(1)
Price = Product.Column(2)
DoCmd.GoToControl "Units"
Total = Price * Qty
Forms!frmOrders!OrderTotal = Forms!frmOrders!OrderSubTotal +
Forms!frmOrders!Shipping + Forms!frmOrders!Tax
End Sub
Everything works ok except the updating of the OrderTotal. If I click
onto the main form and then alter the item combobox again, only then do I
see the OrderTotal updated.
Can I do something in code that will update this in real time? I wonder
if it is something to do with refreshing the record or something.
Thanks,
Dave
When I pick an item from the combobox on the datasheet subform, it
populates description, price and total.
Then it attempts to store an OrderTotal value on the main form.
My code on the afterupdate event of the item combobox is...
Private Sub Product_AfterUpdate()
Description = Product.Column(1)
Price = Product.Column(2)
DoCmd.GoToControl "Units"
Total = Price * Qty
Forms!frmOrders!OrderTotal = Forms!frmOrders!OrderSubTotal +
Forms!frmOrders!Shipping + Forms!frmOrders!Tax
End Sub
Everything works ok except the updating of the OrderTotal. If I click
onto the main form and then alter the item combobox again, only then do I
see the OrderTotal updated.
Can I do something in code that will update this in real time? I wonder
if it is something to do with refreshing the record or something.
Thanks,
Dave