Hello Everyone,
I've built a crosstab query and what I'd like it to do is only pull in data for the year that is selected from a form. I thought I had the where clause written correctly, but the query ends up displaying all records instead of the year based on the date in the form.
PARAMETERS [forms]![Main Menu]![End Date] DateTime;
TRANSFORM Avg([Stock Adjustments].Cost) AS AvgOfCost
SELECT [Stock Adjustments].Whse, Avg([Stock Adjustments].Cost) AS [Total Of Cost]
FROM [Stock Adjustments]
WHERE ((Year([forms]![Main Menu]![End Date])=Year(Date())))
GROUP BY [Stock Adjustments].Whse
PIVOT [Stock Adjustments].[Manual Log];
If someone can point me in the right direction I'd appreciate it.