No. Basically you set up two recordsets in the query. The first recordset controls what is being summed based on the Date. The second recordset looks at the Date in the first recordset and sums all the values in the field Expr1 of the second recordset up to the Date indicated by the first recordset. Then the query moves to the next record in the first recordset and does the process all over.
It might help to add an Order By clause to the SQL
SELECT qryStartingBalance.Date, Sum(qryStartingBalance_1.Expr1) AS SumOfExpr1
FROM qryStartingBalance, qryStartingBalance AS qryStartingBalance_1
WHERE (((qryStartingBalance_1.Date)<[qryStartingBalance].[Date]))
GROUP BY qryStartingBalance.Date
ORDER BY qryStartingBalance.Date;
The queries are correct as far as I can see. They run for me so the syntax is right. You seemed to confirm that when you ran just the one query based on the table and didn't get an error. So what to do. You could append the records from the Union Query to a Temp Table and then try running the third query against that. That way, the other queries don't have to be running to produce records. You would have to automate it from a Form probably. You'd have to run a Delete query against existing records in Temp Table, then run the Append Query to add fresh records to the Temp table, and then run the Final query against that. Seems like the long way around but once it's automated, it would run quickly. The real question I have is whether it's an A2003 problem. Do you have a machine running 2000 around that you could test the queries on. If not, you could email the Db to me
pbricker@comcast.net
and I could do it here but I'm not sure that would solve the issues.
Paul