Lonnie Johnson
prodevmg at yahoo.com
Tue Oct 25 15:39:37 CDT 2005
I don't think you can add two fields together inside the DSum's first parm. It only allows one field to be mentioned.
Try ...
SELECT Injection.RecordDate, DSum("[Theoretical CO2] ,"Injection","[RecordDate]=#" & [RecordDate] & "#") + DSum("[Theoretical
Water]","Injection","[RecordDate]=#" & [RecordDate] & "#") AS [Cum Inj]
FROM Injection
GROUP BY Injection.RecordDate;
"Kaup, Chester" <Chester_Kaup at kindermorgan.com> wrote:
I have the following query to try to get a running sum with a sum each
day. I am getting the same number each day. I probably have some simple
syntax error but am not seeing it. Her eis the SQL.
SELECT Injection.RecordDate, DSum("[Theoretical CO2] + [Theoretical
Water]","Injection","[RecordDate]=#" & [RecordDate] & "#") AS [Cum Inj]
FROM Injection
GROUP BY Injection.RecordDate;
Chester Kaup
Engineering Technician
Kinder Morgan CO2 Company, LLP
Office (432) 688-3797
FAX (432) 688-3799
No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
May God bless you beyond your imagination!
Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.