- SDate
- TestCount
Now, the values in the sdate are typically like 01/01/2012 06:45 PM,01/02/2012 06:45 PM,01/01/2012 07:45 PM,10/10/2012 06:45 PM,11/30/2012 07:45 PM,
Now, I want to create a report which shows data group by the "Time" value under the 'sdate' field and shows the sum of "test count" time wise
So my query is
Expand|Select|Wrap|Line Numbers
- Select Timevalue(Sdate) ,
- sum(TestCount)
- from TestMaster
- Group by Timevalue(Sdate)
This works fine..If I call the report from a form , the report is generated correctly..
Now, the problem is while calling the report from the form, I want the report to display data for a specific date range only. So I have two fields called startDate and EndDate on the form.
I am passing these two as parameters while calling the report
Expand|Select|Wrap|Line Numbers
- docmd.openreport "reportName", acfilterview,,"Datevalue(sdate)>='" & startdate & "' And datevalue(sdate)<='" & endDate & "'"