Before you do this, could there be valid situations where the stored total
should be different from the sum in the other table? If not, don't take on
the responsibility to keep this total always right, regardless of how
records are added/edited/deleted in the other table. Not worth it.
If you want to do it anyway, you should be able to use a DSum() or a
subquery into the UPDATE clause of the action query, e.g.:
UPDATE tblOrder SET MyTotal =
(SELECT SUM(Amount) FROM tblOrderDetail
WHERE tblOrderDetail.OrderID = tblOrder.OrderID);
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"someguy" <in*********@yahoo.com> wrote in message
news:Xn*********************************@216.196.9 7.142...
I'm trying to update a row in a table. The value in this record must
be set to the sum of a column from another table. I can't seem to figure
this out, i keeps saying my query is not updateable. Any sugguestions.
Thanks in advance.
TIA