[AccessD] Help needed with DSum

Kaup, Chester Chester_Kaup at kindermorgan.com
Tue Oct 25 15:56:11 CDT 2005


Tried it with just one field. Sorry to report all I get is a sum for
each day not a running total. Maybe I did not make it clear.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Lonnie
Johnson
Sent: Tuesday, October 25, 2005 3:40 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Help needed with DSum

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.  
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list