i'm wondering about your tables design. let's forget forms for a minute, and
first make sure that you have a normalized table design. from your
description, sounds like you should have a minimum of five tables, along the
lines of
tblClasses
ClassID (primary key)
(the primary key field would probably hold your values 5A, 4C, etc.)
(other fields that specifically describe a class)
tblSubjects
SubjectID (primary key)
SName (math, english, geography, etc)
(other fields that describe a specific subject)
tblClassSubjects
ClassID (foreign key from tblClasses)
SubjectID (foreign key from tblSubjects)
(use the two fields above as a combination primary key, or add an AutoNumber
field as the primary key field)
(any other fields that describe a specific subject *in a specific class*)
tblStudents
StudentID (primary key)
FName
LName
ClassID (foreign key from tblClasses - *i'm assuming that each student is in
only one class*)
(other fields that specifically describe a student)
tblStudentGrades
StudentID (foreign key from tblStudents)
SubjectID (foreign key from tblSubjects)
(if you're only recording one grade for each student in each subject, use
the two fields above as a combination primary key; otherwise, you can add an
Autonumber field as the primary key field)
Grade
(any other fields that describe a specific grade in a specific subject, for
a specific student)
tblClasses and tblSubjects have a many-to-many relationship. this is
resolved with the linking table tblClassSubjects. set a one-to-many
relationship between tblClasses and tblClassSubjects, linking on the ClassID
field. set a one-to-many relationship between tblSubjects and
tblClassSubjects, linking on the SubjectID field.
set a one-to-many relationship between tblClasses and tblStudents, linking
on the ClassID field (this is per the assumption noted above).
tblStudents has a many-to-many relationship with tblSubjects. this is
resolved with the linking table tblStudentGrades. set a one-to-many
relationship between tblStudents and tblStudentGrades, linking on the
StudentID field. set a one-to-many relationship between tblSubjects and
tblStudentGrades, linking on the SubjectID field.
to enter grades for your students, you'll probably need some sort of
form/subform setup, that will also use comboboxes in appropriate places. how
you set that up will depend on how you want to enter the grades - for
instance, "math grades for all students in all classes" or "subject grades
for students in a specific class".
hth