You have provided few details, but it sounds as if you are storing course
information in the Students table. In a typical student/courses database
you would have a Students table (tblStudents) and a Courses table
(tblCourses). Since each student can take many (i.e. more than one) courses
and each course can be attended by many students, there is a one-to-many
relationship between Studetns and Courses. In order to resolve this a third
table is needed (tblEnrollment).
tblStudents
StudentID (primary key, or PK)
FirstName
LastName
(and other personal information)
tblCourses
CourseID (PK)
Department
Title
Date
etc.
tblEnrollment
EnrollmentID (PK)
StudentID (foreign key, or FK)
CourseID (FK)
Grade
(and other information specific to a particular student in a particular
course)
Primary keys are assigned in table design view. The foreign keys need to be
the same data type as their namesake primary keys. If the data type for the
PK is autonumber, the corresponding FK needs to be number; otherwise they
both need to be the same. Primary keys and data types are established in
table design view.
Create a relationship between the PK and FK fields: In the Relationships
window, drag StudentID from one table on top of StudentID in the other
table. Click Enforce Referential Integrity. Repeat for the other table.
Create a form (frmStudents) based on tblStudents and another
(fsubEnrollment) based on tblEnrollment. On fsubEnrollment, create a combo
box (you can use the wizard) bound to CourseID. In form design view, drag
the icon for fsubEnrollment onto frmStudents. This will let you populate a
student's record with course information. Once this works you can work on
restricting the list of courses to current courses, or viewing all courses
the student has ever taken, or anywhere in between.
You can build a form or report based on tblCourses, with a subreport based
on tblEnrollment, to view the enrollment in a particular course. You can
also reverse tblStudents and tblCourses in the above to create a main form
based on tblCourses, which you can then populate with student names. In
either case you can use a form or report to view the information based on a
student's course load or a course's enrollment roster.