|
|
Calculating a total on a subform and display it on the main form. A main/sub-form duo shares a one-to-many relationship. The main form has the one side of the relationship, such as the OrderID. The sub-form has the many side of the relationship, such as the Quantity and UnitPrice fields for each line item. Total the extended prices for each OrderID with a Sum expression. Place it in the sub-form footer; give it a name, such as OrderTotal; and make it invisible. Then, reference the sub-form field on the main form with an expression, such as [sub-form name].Form![OrderTotal].
|