Query sum and update

  • Thread starter Thread starter Blue
  • Start date Start date
B

Blue

good morning;

i've one table name main with one filed totalamount and one table detail
with a field finalprice.
the two table are joined bye idproject field.
can you help me to create a query that sum all field finalprice (details
table) groutp by idproject and update the value to field totalamount in main
table?

thank to all
 
It is rarely necessary to store a calculated value (?your [TotalAmount]?).
Doing so creates more work for you, since you will also need to build the
code you need to ensure synchronization ... what happens if someone
'corrects' an error in the underlying detail record(s)?!

If you can create a query that sums all [FinalPrice] values by [IDProject],
then you can use that query to display the calculated TotalAmount, on the
fly. Take a look at the Totals query button in design view.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
Back
Top