Display values of a field in the Form

G

Guest

How can I get one field in a form to display the values that corrosponds to
another field in the same form. The fields I have are "Class" & "Students",
how can I get the field "Students" to display the name of the students of a
class once the class name is selected in the "Class" field? Any help will be
greatly appreciated.
Steve
 
R

Rick Brandt

steve said:
How can I get one field in a form to display the values that
corrosponds to another field in the same form. The fields I have are
"Class" & "Students", how can I get the field "Students" to display
the name of the students of a class once the class name is selected
in the "Class" field? Any help will be greatly appreciated.
Steve

This makes no sense in the context of a properly designed database. Classes
should be listed in one table and students in another. There should never be a
"field" that displays more than one student's name since a field should only
ever contain a single value.

I would envision a Classes form based on a Classes table having a subform for
Students based on a Students table. Then as you look at each Class record the
students enrolled in that class would be shown in the subform. Since this is a
Many to Many relationship you could also have another form/subform where the
parent/child entities are reversed so that looking at any one student record
would display all of the classes they are enrolled in.

An intermediate table (Enrollment) would be used to associate students and
classes since each class can have multiple students and each student can enroll
in multiple classes. This means you need at least three tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top