speakers_86
Registered User.
- Local time
- Today, 16:26
- Joined
- May 17, 2007
- Messages
- 1,919
I'm working on an assignement where students are registered for class. I am stumped on how to prevent students from registering for classes that occur at the same time. Any one want to lend a hand?
Tables:
tblCourses (Math, Enlish, etc.)
tblClass (courseID, InstructorID, ClasroomID, DayID, TimeID, etc)
tblInstructors
tblClassSubStudents (ClassID, StudentID)
tblDays (M for Monday, T for Tuesday, W, for Wendesday, R for Thursday, etc)
From the instructions, it seems as if the relationships should prevent enrolling in classes at the same time. I didn't see how to do that, so I am currently trying to prevent it at the form level. The quasi-solution I have now is that I combine the classes start date, day of class, and time of class. This gives me a day time group. I use that DTG and the query wizard to make a find unmatched query. That unmatched query is the basis of the combo box that registers the students for classes. This works in very simple examples if the day values in tblDays where only M T W R F S. So if a student takes a class at M 0900, then the unmatched query still allows the student to register for classes that are at MWF 0900. The student is now in two classes at once Mondays at 0900.
Edit- I'm not sure why I was set on doing this with queries, but it seems helluva easier to do with vba.
Tables:
tblCourses (Math, Enlish, etc.)
tblClass (courseID, InstructorID, ClasroomID, DayID, TimeID, etc)
tblInstructors
tblClassSubStudents (ClassID, StudentID)
tblDays (M for Monday, T for Tuesday, W, for Wendesday, R for Thursday, etc)
From the instructions, it seems as if the relationships should prevent enrolling in classes at the same time. I didn't see how to do that, so I am currently trying to prevent it at the form level. The quasi-solution I have now is that I combine the classes start date, day of class, and time of class. This gives me a day time group. I use that DTG and the query wizard to make a find unmatched query. That unmatched query is the basis of the combo box that registers the students for classes. This works in very simple examples if the day values in tblDays where only M T W R F S. So if a student takes a class at M 0900, then the unmatched query still allows the student to register for classes that are at MWF 0900. The student is now in two classes at once Mondays at 0900.
Edit- I'm not sure why I was set on doing this with queries, but it seems helluva easier to do with vba.
Last edited: