View Full Version : Count Number of distinct students seen by each tutor?


kate10123
11-20-2008, 12:07 PM
Hi there,

I have three tables with the information to be able to get a count of how many students that each tutor has seen but everything I have tried using the cross tab type of query and putting a count on studentID and group by tutor name but this seems to count the students the same for each tutor which is not right.

The fields are as follows:
StudentID FROM tbl_Tutorial
TutorName FROM tbl_Tutor

Any ideas would be appreciated :)

MSAccessRookie
11-20-2008, 12:13 PM
Hi there,

I have three tables with the information to be able to get a count of how many students that each tutor has seen but everything I have tried using the cross tab type of query and putting a count on studentID and group by tutor name but this seems to count the students the same for each tutor which is not right.

The fields are as follows:
StudentID FROM tbl_Tutorial
TutorName FROM tbl_Tutor

Any ideas would be appreciated :)

Can you show the query that you are using? It would be a big help in determining what is going on. Two tables that are being joined must have something in common to join on, or they will usually not bring the desired results.

kate10123
11-20-2008, 12:23 PM
The query is in the database attached. is called CountStudents

MSAccessRookie
11-20-2008, 12:30 PM
The query is in the database attached. is called CountStudents


As I suspected, the tables are not joined by anything. In the design view for the query CountStudents, join the tables by TutorID by dragging the one from tbltutor and connecting it with tblTutorial. I think that willl give you what you want.

kate10123
11-20-2008, 12:57 PM
Thanks that worked!

MSAccessRookie
11-20-2008, 01:00 PM
Thanks that worked!

Thanks for reporting your success