Here is a little background first. I have a report with rows labeled 9:00 - 10:00 am, 10:00 - 11:00 am, thru 12:00 -1:00am and the columns are Mon, Tue, and so on. In addition we have a total for each row and column. The report is generated from a date range that is entered into a form from the user.
The report is using Dlookup to reference the query's for the particular location of the report (Mon at 9am). Here is an example of one of the query's I am using.
SELECT COUNT(*) AS NumberOfPics
FROM tblOldAbes
WHERE ((([tblOldAbes].[Day]="Wednesday") AND (([tblOldAbes].[Time])="16") AND (([tblOldAbes].[FullDate]) BETWEEN [forms].[frmDateRangeOA].[txtDateStartOA] AND [forms].[frmDateRangeOA].[txtDateEndOA]));
This is working fine. The query counts all the records.
I want to take this a step further and do an average not just a count. This will be in a new and separate report. I want to be able to count the number of Saturdays in the given date range. In the table there will be multiple entries on any Saturday. I only want to count 1 Saturday for a given date. for example the date range entered would be 2/1/2011 - 2/28/2011 Has 4 Saturdays in that range. Then we want to take that number (4 from the previous example) and use that to find the average.
I am having trouble wrapping my mind around the solution to count the Number of Saturdays in the given date range.
If I have not given enough info or you have any questions let me know. Any suggestions would be greatly appreciated.
Thank You
Zac Z
The report is using Dlookup to reference the query's for the particular location of the report (Mon at 9am). Here is an example of one of the query's I am using.
SELECT COUNT(*) AS NumberOfPics
FROM tblOldAbes
WHERE ((([tblOldAbes].[Day]="Wednesday") AND (([tblOldAbes].[Time])="16") AND (([tblOldAbes].[FullDate]) BETWEEN [forms].[frmDateRangeOA].[txtDateStartOA] AND [forms].[frmDateRangeOA].[txtDateEndOA]));
This is working fine. The query counts all the records.
I want to take this a step further and do an average not just a count. This will be in a new and separate report. I want to be able to count the number of Saturdays in the given date range. In the table there will be multiple entries on any Saturday. I only want to count 1 Saturday for a given date. for example the date range entered would be 2/1/2011 - 2/28/2011 Has 4 Saturdays in that range. Then we want to take that number (4 from the previous example) and use that to find the average.
I am having trouble wrapping my mind around the solution to count the Number of Saturdays in the given date range.
If I have not given enough info or you have any questions let me know. Any suggestions would be greatly appreciated.
Thank You
Zac Z