You can type the week numbers that you want in the Cretieria cell. These are vailid expressions:
16
in (14,16,17)
between 15 and 18
The expression you type will be transformed to the Having Clause of the query:
SELECT DatePart("ww",[Date],2) AS WeekNumber, Sum(tblData.Qty) AS SumOfQty
FROM tblData
GROUP BY DatePart("ww",[Date],2)
Having DatePart("ww",[Date],2) in (14,16,17)
To filter a range of records, you can use Between ... And ... in the Where Clause e.g the following will not include the March 29-31 records in WeekNumber 14:-
SELECT DatePart("ww",[Date],2) AS WeekNumber, Sum(tblData.Qty) AS SumOfQty
FROM tblData
where [Date] between #4/1/2004# and #4/18/2004#
GROUP BY DatePart("ww",[Date],2)
Having and Where can be used at the same time in a Totals Query. Having filters the groups. Where filters the records.
For monthly totals, you can use:-
SELECT Format([Date],"mmm yyyy") AS [Month], Sum(tblData.Qty) AS SumOfQty
FROM tblData
GROUP BY Format([Date],"mmm yyyy"), Format([Date],"yyyy mm")
ORDER BY Format([Date],"yyyy mm")