How do i create a table from part of another table?

1

1959Nel

I have a table(Master) with students name and class (let say 5a, 5b, 5c). I
want to create a table(5a) for students of class 5a only. However, when i
update the master table, this should reflect on the 5a table. The 5a table
will have other fields that are not in the master table.

I can run a make-table query but that does not solve the problem of update
and keeping the data in the other fields.

Help deeply appreciated. I am stuck on this for 2 weeks now!!!
 
G

Graham R Seach

You would be better to have two tables; tblStudents, and tblStudentClasses.
The former would store information about the students, and the latter would
store information about the classes in which each student is enrolled.

tblStudent
StudentID (Autonumber) Primary Key
Surname (Text)
blah, blah, blah

tblStudentClasses
ClassesID (Autonumber) Primary Key
StudentID (Long Integer)
ClassID (Long Integer)
EnrolledDate (DateTime)

tblClass
ClassID (Autonumber) Primary Key
ClassName (Text)
ClassNo (whatever is required)

The relationships would be as follows:
tblStudent.StudentID --> tblStudentClasses.StudentID (One to many)
tblClass.ClassID --> tblStudentClasses.ClassID (One to many)

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 

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