Adding new records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that lists students in a class. Every three weeks, we add 20 new students using a form. Is there a way to create the form so that it asks for a class number (common to the batch added) so that it doesn't need to be selected from the dropdown list for each student. I already have a table of class numbers that is linked (one-to-many) to the students table.
 
-----Original Message-----
I have a table that lists students in a class. Every
three weeks, we add 20 new students using a form. Is
there a way to create the form so that it asks for a class
number (common to the batch added) so that it doesn't need
to be selected from the dropdown list for each student. I
already have a table of class numbers that is linked (one-
to-many) to the students table.

Create a subform for the Student detail table, and insert
it on a form based on the Classes table. Set the Form
Link Master Fields and Link Child Fields properties to the
appropriate linking fields.

HTH
Kevin Sprinkel
Becker & Frondorf
 
Thanks for the help. I've done as you suggested, but whenever I select the value of the class field from the combo box on the form (other than the class value that the form opens with), it does not allow me to modify the subform

"the changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remover the index, or redefine the index to permit duplicate entries and try again.

The [class number].[class] field is the primary key and indexed, no duplicate
The [students].[class] field is a primary key, not indexed, duplicates allowe
The [class number] table is related to the [students] table by a one-to-many relationship, referential integrity is not enforced

How should they be set up?
 
Back
Top