Can I Use Sum() Function Along With Update Query?

kingking

New member
Local time
Yesterday, 23:30
Joined
Sep 10, 2007
Messages
3
I'm trying to use sum() along with UPDATE as shown below

UPDATE ALLDATA INNER JOIN [Total Data] ON ALLDATA.PanNumber=[Total Data].PanNumber SET ALLDATA.PLAForMonthPrevYear = sum([Total Data].PLAForMonth), ALLDATA.CENVATForMonthPrevYear = sum([Total Data].CENVATForMonth), ALLDATA.PLAUptoMonthPrevYear = sum([Total Data].PLAUptoMonth), ALLDATA.CENVATUptoMonthPrevYear = sum([Total Data].CENVATUptoMonth)
WHERE [Total Data].Month=Forms![FORM REPORT]!Combo3;

IT IS THROWING ERROR
PLS HELP ME
 
You have to create a subquery in which you group by and sum the necessary fields which you can use in your update query.
 

Users who are viewing this thread

Back
Top Bottom