Counting record based on a criteria

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Answered
Hello! I have two tables: Classes and Students.

Classes fields: Class Name, Teacher, and Start Date
Students fields: Name, Class Name, and Start Date

Someone will enter records in the Classes table. Records of able are being populated from other apps. I want to count the number of students with the same class and start date in the Students table and put it in the Classes table. I tried summary fields in the relationship section but it doesn't seem to work.
Photo of Lina

Lina

  • 226 Points 100 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
My suggestion is to change the structure of your app.

It should be set up like

One Course Master has Many Scheduled Courses. 

The Course Master is like the catalogue of the course content.

The Scheduled Course is saying that say Economics 101 will be run  in the Fall 2018 semester. 

Then One Scheduled Class will have many Student Class Registrations.

One Student will have Many Student Class Registrations.
Photo of Lina

Lina

  • 226 Points 100 badge 2x thumb
Thank you for your fast reply. I will try this one out. But will a simple summary field and lookup not work out?
The problem is that presumably you do not want to spend the rest of your life adding a new summary field every time there is a new scheduled class which has a unique start date.  That would be the only way to get a count of the # of students for a given start date.  But then every new Course Start date will need to have a new summary field, so that is not a correct design.
Photo of Lina

Lina

  • 226 Points 100 badge 2x thumb
Got it. Thank you so much.
Photo of Lina

Lina

  • 226 Points 100 badge 2x thumb
Hello. Just a follow up question. In the set up above, how many tables were on it?
There are 4 tables.

1. Course Master
2. Scheduled Courses
3. Students
4. Student Class Registrations