Hi,
I assume you mean to SUM all the details.
SELECT receptionNumber, SUM(amount) totalOfAmounts
FROM Details
GROUP BY receptionNumber
will collect all the amounts linked to a given receptionNumber, and SUM them
(their physical amount, or their $ value, it is up to you to fill the detail
about what is exactly "amount" in YOUR case).
If you want to "consolidate" the previous sum with the one announced in the
Summary, you can make a second query:
SELECT summary.receptionNumber, summary.totalAmount, q1.totalOfAmounts
FROM summary INNER JOIN previousQueryNameHere As q1
ON summary.receptionNumber = q1.receptionNumber
and you can look at the two last columns to see if there are any significant
differences, or let the query find them for you; add a where clause to the
previous query:
WHERE ABS(summary.totalAmount - q1.totalOfAmounts) >= 0.02
Hoping it may help,
Vanderghast, Access MVP