So just for an update this is what I have currently and for most purposes it works:
SELECT APNDate.APN, APNDate.DateRange, DSum("Amount","Payments","[EffectiveDate]<= #" & [APNDate]![DateRange] & "# AND APN=""" & [APNDate].[APN] & """") AS RunningTotal
FROM Payments RIGHT JOIN APNDate ON...
Wooo HOoooo... Ok... I am soooo close now
Now here is where I am at:
I have dhookom's select query above and I have integrated that into a crosstab query. However information is only populating on dates where there were transactions, not on every date.
So for example
6/1/07 for APN1470021030...
SELECT Payments.APN, DateRange.DateRange, DSum("Amount","Payments","[EffectiveDate]<= #" & DateRange!DateRange & "#") AS RunningTotal
FROM Payments RIGHT JOIN DateRange ON Payments.EffectiveDate = DateRange.DateRange
GROUP BY Payments.APN, DateRange.DateRange, Payments.Amount...
I have modified my DSUM Statement to include <= as that is what I had intended but it was an over sight.
However I still have issues with the crosstab query not running without the error:
Syntax Error in date in query expression '[Date]=##'
In addition I am not sure what you mean by running a...
Current SQL:
TRANSFORM DSum("Amount","Payments","[EffectiveDate]= #" & [DateRange]![DateRange] & "#") AS [Running Total]
SELECT Payments.APN
FROM Payments RIGHT JOIN DateRange ON Payments.EffectiveDate = DateRange.DateRange
GROUP BY Payments.APN, Payments.Amount, Payments.EffectiveDate
ORDER BY...
Dhookom,
Thank you very much... I feel like I'm getting on the right track however now there is an error of:
Syntax Error in date in query expression '[Date]=##'
Could this be alleviated if i change Date to EffectiveDate ?
Hi Lespaul,
The change is on the Group by line. So basically I had changed what was initially wrong.
Now I need to figure out what is causing the Data Type Mismatch in critera error.
After that I'll probably have some issues with DSUM... any other hints on how to get a crosstab query to...
After Include the Amount Field, and the Date Field in the query I no longer got the aggregate function error, but instead I get "Data Type Mismatch in Critera"
SQL:
TRANSFORM DSum(Payments!Amount,"Payments",[Date Range]![Date Range]=Payments!Date) AS [Running Total]
SELECT Payments.APN
FROM...
I am trying to create a crosstab query where the Value Field is a sum of all of the transactions in the Payments Table prior to header date for that column. So I am looking for a running total of sorts, to use in an average daily balance calculation
The Header Dates are driven by another table...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.