add a textbox called say txtSum to the subform footer with =sum(calculation) as the controlsource where calculation is however you are calculating the value (e..g =sum([quantity]*[price])
on the mainform, you reference it with =salesdetails.form.txtSum
Rather than calculating the values for the the computed controls in the form and subform, an alternative would be to return them in the parent form's RecordSource query as follows:
SQL:
SELECT
*,
DSUM (
"(UnitPrice*Quantity)",
"SaleDetails",
"SaleID = " & SaleID
) AS TotalAmount,
DSUM (
"(UnitPrice*Quantity) - Discount",
"SaleDetails",
"SaleID = " & SaleID
) AS NetAmount,
NetAmount - ReceivedAmount AS RemainingAmount
FROM
Sales;
The computed values should not be stored in columns in the tables as this could lead to update anomalies. These columns should be dropped from the table definitions. As noted earlier in this thread you have discount columns in both tables. I've assumed that the Discount column in SaleDetails is the correct one, and that in Sales should be dropped.
The DSum function is used to return the total and net amounts, rather than subqueries, so that the query will return an updatable recordset.