Hello all!
I have two peer subforms on a main form: sfrmOrders, sfrmOrderLines.
The sfrmOrders has a control (as part of the "Detail" area) bound to a table field: Total_Before_Discount. In this way, the user can see each line of order-header with its total.
sfrmOrderLines has two bound fields (in the "Detail" area), from two separated tables(!):
Unit_Price - bound to table tblProducts
Bottles_Ordered - bound to table tblOrderLines
What I need to achieve:
Upon changing Bottles_Ordered, I need Total_Before_Discount of the current row in sfrmOrders to be updated and refreshed.
Initially, I thought DSum is the natural way, but it doesn't work (probably because the two fields that needs to be multiplied don't share the same domain/table).
I currently have hidden fields in sfrmOrderLines that hold the multiplication (per row) and the total (in the "Header" area) that can serve a solution, if necessary - I couldn't get it to work properly.
Any ideas?
Thanks!
I have two peer subforms on a main form: sfrmOrders, sfrmOrderLines.
The sfrmOrders has a control (as part of the "Detail" area) bound to a table field: Total_Before_Discount. In this way, the user can see each line of order-header with its total.
sfrmOrderLines has two bound fields (in the "Detail" area), from two separated tables(!):
Unit_Price - bound to table tblProducts
Bottles_Ordered - bound to table tblOrderLines
What I need to achieve:
Upon changing Bottles_Ordered, I need Total_Before_Discount of the current row in sfrmOrders to be updated and refreshed.
Initially, I thought DSum is the natural way, but it doesn't work (probably because the two fields that needs to be multiplied don't share the same domain/table).
I currently have hidden fields in sfrmOrderLines that hold the multiplication (per row) and the total (in the "Header" area) that can serve a solution, if necessary - I couldn't get it to work properly.
Any ideas?
Thanks!