Access 2003 DSum Issue

A

Anjie

Hello, I have been trying to get the DSum function in Access 2003 to
work for me. I have managed to make it work quite effectively in a
form, but now I also need it to work in a Query so that I can export
the data to Excel. Please see below the specifics of my problem, and
thank you in advance for any assistance!!

DailyFlowDetail = a table with all pertinent information.
AutoID = a date/time field, but not set to unique.
Auto# = an autonumber field, set to unique.
BBLS Oil = the field to be summed (I need a running sum in the table
results)
atid = AutoID (only on the query level, this field is not in the table
DailyFlowDetail)

SQL from Query:
SELECT DailyFlowDetail.[auto#], DailyFlowDetail.[BBLS Oil],
DailyFlowDetail.AutoID AS atiD, DSum("BBLS
Oil","DailyFlowDetail","[DailyFlowDetail]![AutoID] <=" & [atid]) AS
[Sum]
FROM DailyFlowDetail
GROUP BY DailyFlowDetail.[auto#], DailyFlowDetail.[BBLS Oil],
DailyFlowDetail.AutoID;

My results (from all of my attempts) are Null, include all fields, or
#Error. I cannot seem to make the running sum function work. Thank you
again for any and all help!
 
Top