J
jale
Hi
I am trying to figure out RunningTotals form article.I figure out second
method.But I couldn't figure out first method.
Here is my sql.What is my fault?.
SELECT DatePart("yyyy",[OrderDate]) AS AYear, DatePart("m",[OrderDate]) AS
AMonth, DSum("Freight","Orders","DatePart('m';[OrderDate])<=" & [AMonth] & "
And DatePart('yyyy';[OrderDate])<=" & [AYear] & " ") AS RunTot,
Format([OrderDate],"mmm") AS FDate
FROM Orders
WHERE (((DatePart("yyyy",[OrderDate]))=1997))
GROUP BY DatePart("yyyy",[OrderDate]), DatePart("m",[OrderDate]),
Format([OrderDate],"mmm")
ORDER BY DatePart("yyyy",[OrderDate]), DatePart("m",[OrderDate]),
Format([OrderDate],"mmm");
ayear,amonth and Fdate are OK.But RunTot gives #error.
Any help will be appreciated.
I am trying to figure out RunningTotals form article.I figure out second
method.But I couldn't figure out first method.
Here is my sql.What is my fault?.
SELECT DatePart("yyyy",[OrderDate]) AS AYear, DatePart("m",[OrderDate]) AS
AMonth, DSum("Freight","Orders","DatePart('m';[OrderDate])<=" & [AMonth] & "
And DatePart('yyyy';[OrderDate])<=" & [AYear] & " ") AS RunTot,
Format([OrderDate],"mmm") AS FDate
FROM Orders
WHERE (((DatePart("yyyy",[OrderDate]))=1997))
GROUP BY DatePart("yyyy",[OrderDate]), DatePart("m",[OrderDate]),
Format([OrderDate],"mmm")
ORDER BY DatePart("yyyy",[OrderDate]), DatePart("m",[OrderDate]),
Format([OrderDate],"mmm");
ayear,amonth and Fdate are OK.But RunTot gives #error.
Any help will be appreciated.