I have a main form with a subform, linked via STUDENTID.
On the subform, the following happens:
(1) Teacher selects their name from a drop-down list (TEACHERID)
(2) Teacher selects subject name from a drop-down list (SUBJECTID)
(3) Teacher enters comment into memo field (SUBJECTCOMMENT)
This data is all contained in the table SUBJECTCOMMENTS, with SubjectCommentID (PK), SubjectID (FK), TeacherID (FK), StudentID (FK)
The problem is, the current set up (and we have absolutely no time to change table or relationship structure as the database needs to be finished by the end of today!) allows teachers to create duplicate combinations of TEACHER ID, SUBJECTID and STUDENTID.
This should not be allowed to happen; or at the very least, a warning textbox should appear that warns the user and then clears the data from that record.
Is there a relatively simple way to prevent this at form level?