Saving multiple values to a single record (1 Viewer)

aprentice

Registered User.
Local time
Today, 07:45
Joined
Aug 27, 2005
Messages
37
I want to have a box with yes/no choices defining the Lessons a Student chooses. Sth like this
Because the Lessons are quite plenty and they change from time to time, I don't want to have them predefined in the Sudent table, but to have a related table containg the Lessons providing more flexibility.
My problem is how to assign the Yes/No values from the form to a single record. ANy suggestions?
A first thought is to create a List from Lessons table, with 2 columns. 1st the Lesson and 2nd the Y/N box. Every Lesson would have a value like this:
1,2,4,8,16,32,64...
With this way the sum of the Lessons would be unique for each combination and it could be saved in a single record. But such a solution is not so practical.
Any alternatives?

Thnx in advance
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:45
Joined
Feb 19, 2002
Messages
43,677
You need to add a new table. Since there is a many-to-many relationship between students and lessons, this information needs to be stored in a junction table. This junction table will also contain the student's grade for the lesson if necessary.

tblStudentLessons
StudentID (primary key fld1, foreign key to student table)
LessonID (primary key fld2, foreign key to lesson table)
LessonGrade
LessonAssignedDate
LessonReturnedDate
etc.
Use a subform to assign lessons to students or students to lessons which ever makes more sense in your situation.

Microsoft has recently released a number of new templates in A2003/A2002 format. They are much improved over the older versions. You can find them here:
http://office.microsoft.com/en-us/assistance/HA012341591033.aspx

If you are working with an older version, try to get someone to convert them for you because they are so much better than the old ones.
 

Users who are viewing this thread

Top Bottom