Hi guys,
I know this an old thread but it is exactly the type of question I have been meaning to ask.
I have two unbound textboxes on a form (frm_reports) called txtFrom and txtTo
I have managed to get these to output on all the reports but how can I actually make them usable in the query that generates the report?
so that the report output is actually based on this date range.
I have tried something like this:
SELECT Count(tbl_Tutorial.StudentID) AS CountOfStudentID, tbl_Student.Nationality, tbl_Tutorial.Date
FROM tbl_Student INNER JOIN tbl_Tutorial ON tbl_Student.StudentID = tbl_Tutorial.StudentID
WHERE (((tbl_Tutorial.outcome)="Attended") AND ((tbl_Tutorial.Date) Between [forms]![frm_reports]![txtFrom] And [forms]![frm_reports]![txtTo]))
GROUP BY tbl_Student.Nationality;
but the error message that appears is as follows:
'Date is not part of an aggregate function'
I would be really grateful for any advice on this.
Thanks
