S
Sandy
Self taught Access and VBA would appreciate any guidance.
I have two tables tblStudents, tblClass that are causing me difficulties. I
can see the problem with my approach but am not sure how to proceed.
tblstudents has field studentID,YearID,RollClassID as well as other fields
containing information about the student. tblClass has fields RollClassID (an
autoNumber), RollClass, SchoolYear, TeacherID.
Within the data base a user can add a student through forms where the
RollClassID is a lookup based on RollClassID and RollClass in tblClass. A
user can also add new rollclasses each year through user friendly forms. Any
connections between other forms use master child links based on the
RollClassID as a roll class may have the same name from one school year to
the next . All seems good.
But whats spinning my head out is that I also want to enable users to do a
mass import of Roll classes and students from excel sheets. The Roll class xl
sheet contains RollClass & Teacher and Access is good enough to add the
autonumbers but the Student XL sheet only contains the RollClass not the
RollClassID (which really only Access Knows as it is an autonumber)
Should I be constructing a primary key using year and RollClass Name for the
tblClass? At present the StudentXL sheet makes no reference to what school
year it is so I am concerned about making sure I end up cinstructing the
correct RollClassID. I can manipulate the xl sheets via VBA if need be. Also
school years do line up with calender years as I live in Australia. I know I
have got it wrong just not sure what direction to head
I have two tables tblStudents, tblClass that are causing me difficulties. I
can see the problem with my approach but am not sure how to proceed.
tblstudents has field studentID,YearID,RollClassID as well as other fields
containing information about the student. tblClass has fields RollClassID (an
autoNumber), RollClass, SchoolYear, TeacherID.
Within the data base a user can add a student through forms where the
RollClassID is a lookup based on RollClassID and RollClass in tblClass. A
user can also add new rollclasses each year through user friendly forms. Any
connections between other forms use master child links based on the
RollClassID as a roll class may have the same name from one school year to
the next . All seems good.
But whats spinning my head out is that I also want to enable users to do a
mass import of Roll classes and students from excel sheets. The Roll class xl
sheet contains RollClass & Teacher and Access is good enough to add the
autonumbers but the Student XL sheet only contains the RollClass not the
RollClassID (which really only Access Knows as it is an autonumber)
Should I be constructing a primary key using year and RollClass Name for the
tblClass? At present the StudentXL sheet makes no reference to what school
year it is so I am concerned about making sure I end up cinstructing the
correct RollClassID. I can manipulate the xl sheets via VBA if need be. Also
school years do line up with calender years as I live in Australia. I know I
have got it wrong just not sure what direction to head