C
Carrie_Loos via AccessMonster.com
Hi, I have been trying to sum quantities between dates without success. In my
last attempt I get an error message of "you tried to execute a query that
does not include the specified expression ([SumOfOrd Qty], [SumofOrd Qty]
Between DateAdd("m",-12,[MROs]![Date Open]) And DateAdd("m",13,[MROs]![Date
Open]) as part of an aggregate function." Can anyone explain what I do not
understand?
PARAMETERS [Month] DateTime;
SELECT MROs.[Core Part Nbr], Format([Date Open],"mmm-yy") AS [Month], Sum
(MROs.[Ord Qty]) AS [SumOfOrd Qty], [SumofOrd Qty] Between DateAdd("m",-12,
[MROs]![Date Open]) And DateAdd("m",13,[MROs]![Date Open]) AS Forecast1
FROM MROs
GROUP BY MROs.[Core Part Nbr], Format([Date Open],"mmm-yy"), [SumofOrd Qty]
Between DateAdd("m",-12,[MROs]![Date Open]) And DateAdd("m",13,[MROs]![Date
Open]);
last attempt I get an error message of "you tried to execute a query that
does not include the specified expression ([SumOfOrd Qty], [SumofOrd Qty]
Between DateAdd("m",-12,[MROs]![Date Open]) And DateAdd("m",13,[MROs]![Date
Open]) as part of an aggregate function." Can anyone explain what I do not
understand?
PARAMETERS [Month] DateTime;
SELECT MROs.[Core Part Nbr], Format([Date Open],"mmm-yy") AS [Month], Sum
(MROs.[Ord Qty]) AS [SumOfOrd Qty], [SumofOrd Qty] Between DateAdd("m",-12,
[MROs]![Date Open]) And DateAdd("m",13,[MROs]![Date Open]) AS Forecast1
FROM MROs
GROUP BY MROs.[Core Part Nbr], Format([Date Open],"mmm-yy"), [SumofOrd Qty]
Between DateAdd("m",-12,[MROs]![Date Open]) And DateAdd("m",13,[MROs]![Date
Open]);