Hi,
I have a table with two columns: GamingDate and PassCnt.
I am trying to write a query that will give me the PassCnt, MTD PassCnt, and YTD PassCnt for a date entered by the user. I have the following figured out so far:
However, and probably obvious to yall is that the MTD and YTD numbers are just replications of the current PassCnt.
How do I modify my query to add up Month to Date and Year to Date numbers?
As always I look forward to your help.
Mike
“Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.”-Albert Einstein
I have a table with two columns: GamingDate and PassCnt.
I am trying to write a query that will give me the PassCnt, MTD PassCnt, and YTD PassCnt for a date entered by the user. I have the following figured out so far:
Code:
SELECT tbl_PASS_CNT.GamingDATE, tbl_PASS_CNT.PASSCnt, Sum(tbl_PASS_CNT.PASSCnt) AS [MTD PASS CT], Sum(tbl_PASS_CNT.PASSCnt) AS [YTD PASS CT]
FROM tbl_PASS_CNT
GROUP BY tbl_PASS_CNT.GamingDATE, tbl_PASS_CNT.PASSCnt
HAVING (((tbl_PASS_CNT.GamingDATE)=[Enter Date] Or (tbl_PASS_CNT.GamingDATE)=DateAdd("yyyy",-1,[Enter Date])));
However, and probably obvious to yall is that the MTD and YTD numbers are just replications of the current PassCnt.
How do I modify my query to add up Month to Date and Year to Date numbers?
As always I look forward to your help.
Mike
“Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.”-Albert Einstein