I have a report that lists all children who received a hearing or vision test within a prompted date range. I would like to create another report using the same criteria, but group by Facility from the Vision_Results and Hearing_Results tables. I can’t figure out how to group by 2 different fields.
Here’s my table setup:
Table Client – ClientNum(Key), Lname, FName, DOB, and assorted parent and address fields
Table Vision_Results – Result, Date, Comments, Facility, ClientNum, RecNum(Key)
Table Hearing_Results – Result, Date, Comments, Facility, ClientNum, RecNum(Key)
Query the report runs off of:
SELECT Tbl_Client.LName, Tbl_Client.FName, Tbl_Client.DOB, Tbl_Vision_Results.Result, Tbl_Vision_Results.Date, Tbl_Vision_Results.Comments, Tbl_Hearing_Results.Result, Tbl_Hearing_Results.Date, Tbl_Hearing_Results.Comments, Tbl_Vision_Results.Facility, Tbl_Hearing_Results.Facility
FROM (Tbl_Client INNER JOIN Tbl_Hearing_Results ON Tbl_Client.ClientNum = Tbl_Hearing_Results.ClientNum) INNER JOIN Tbl_Vision_Results ON Tbl_Client.ClientNum = Tbl_Vision_Results.ClientNum
WHERE (((Tbl_Vision_Results.Date) Between [Enter Start Date: ] And [Enter End Date: ])) OR (((Tbl_Hearing_Results.Date) Between [Enter Start Date: ] And [Enter End Date: ]));
Any help would be great! Thanks!
Here’s my table setup:
Table Client – ClientNum(Key), Lname, FName, DOB, and assorted parent and address fields
Table Vision_Results – Result, Date, Comments, Facility, ClientNum, RecNum(Key)
Table Hearing_Results – Result, Date, Comments, Facility, ClientNum, RecNum(Key)
Query the report runs off of:
SELECT Tbl_Client.LName, Tbl_Client.FName, Tbl_Client.DOB, Tbl_Vision_Results.Result, Tbl_Vision_Results.Date, Tbl_Vision_Results.Comments, Tbl_Hearing_Results.Result, Tbl_Hearing_Results.Date, Tbl_Hearing_Results.Comments, Tbl_Vision_Results.Facility, Tbl_Hearing_Results.Facility
FROM (Tbl_Client INNER JOIN Tbl_Hearing_Results ON Tbl_Client.ClientNum = Tbl_Hearing_Results.ClientNum) INNER JOIN Tbl_Vision_Results ON Tbl_Client.ClientNum = Tbl_Vision_Results.ClientNum
WHERE (((Tbl_Vision_Results.Date) Between [Enter Start Date: ] And [Enter End Date: ])) OR (((Tbl_Hearing_Results.Date) Between [Enter Start Date: ] And [Enter End Date: ]));
Any help would be great! Thanks!