Hello,
I have the following crosstab query to sort grouping of transactions and list the total number of transactions by group:
According to the result set, which as of today, should be all of the corresponding transactions for last month (11/1/2018 - 11/30/2018), all records from 11/1-30 are being returned but it seems to not care about the year. I am seeing records dating back to 2013 which isnt right.
I tried outputting the formatted dateserial functions in the WHERE clause above via a messagebox and everything looks good to me (the years are included). I am not sure why the 2018 part is being left out of the filtering.
Any help would be greatly appreciated!
I have the following crosstab query to sort grouping of transactions and list the total number of transactions by group:
Code:
TRANSFORM Count(sourceQuery.Grouping) AS CountOfGrouping
SELECT sourceQuery.[Major Grouping] AS [Transaction Type]
FROM sourceQuery
WHERE (((sourceQuery.ProcessDate) Between DateSerial(Format(DateAdd("m",-1,Now()),"yyyy"),Format(DateAdd("m",-1,Now()),"mm"),1) And DateSerial(Format(Now(),"yyyy"),Format(Now(),"mm"),0)))
GROUP BY sourceQuery.[Major Grouping]
PIVOT sourceQuery.Grouping;
According to the result set, which as of today, should be all of the corresponding transactions for last month (11/1/2018 - 11/30/2018), all records from 11/1-30 are being returned but it seems to not care about the year. I am seeing records dating back to 2013 which isnt right.
I tried outputting the formatted dateserial functions in the WHERE clause above via a messagebox and everything looks good to me (the years are included). I am not sure why the 2018 part is being left out of the filtering.
Any help would be greatly appreciated!