ChrisLeicester
Member
- Local time
- Today, 03:21
- Joined
- Feb 14, 2025
- Messages
- 33
Hi all
I have an orders main form with a 'cart' subform
The query behind the subform has a calculated field [LineTotal] which calculates QTY*RetailPrice for the subtotal 'Column' and then the textbox in the footer can also calculate an order total. When adding the records it calculates well.
Because I dont want the users to be able to change the price/qty for procedure reason, the fields in view are textboxes showing the actual field values. Should for example the price need to be changed, a double click on the price display brings up the yellow price adjustment form which once the new price is entered updates the correct field in the cart subform. As wanted the line subtotal changes correctly, but the Order total on the subform footer does not.
I have tried to add to the vba confirm button both me.requery and me.refesh, and also tried to add either to the after change and after update events but nothing automatically updates the textbox calculation.
If I press on another product line, or leave and re=enter the new total is shown. I know I should either move to another record or save the record to force access to recalculate and I do have docomd.save as the next line in my vba to set the new price from the adjustment form but whatever it is saving, it is not that record.
Any ideas what I am doing wrong.
Thanks
Chris