Results 1 to 6 of 6
  1. #1
    Daoud1987 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2013
    Location
    Algeria
    Posts
    3

    Populate Junction Table related to 3 Tables

    Hi !




    I explain , i have 5 tables :


    Class ( classID , classname,... )
    Student (studid , firstname, lastname , classID ,....)
    Course( courseid , coursename )
    Term ( termid , termname , begindate , enddate )
    Score ( scoreid , studid , courseid , termid , score)


    Note :
    1) A class can contain one or more students (one-to-many between Class and Student tables)


    The table "Score" is a junction table between three tables : Student , Course and Term because it contains three foreign keys ( I could use a combination of 3 foreign keys to make a primary key ! ) .


    The tables ; "Class", "Student", " Course ", "Term " already contain data for each table I created a data entry form .


    My biggest problem is how to create a form to enter students' grades or scores for each student that belong to his class.


    I do not know how to do it especially since the idea is that :


    On a form I would like to use ComboBox to select a class that displays student's list from class selected and a ComboBox in same form to select course and another ComboBox to select a term and then enter grades or scores for each student


    This is my general idea to enter students' grades.


    The rules are :


    A class contains one or more students
    Each student takes one or more subjects.
    Each student gets scores for each subject and each term(quarter)


    Thank you very very much in advance

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    So your business process is to create the records in Score table that associate Student, Course, Term and then go back to those records later to enter the grades?

    Then you need some way to filter the dataset to particular Course and Term?

    One way is with a parameterized query. Review:
    http://www.datapigtechnologies.com/f...tomfilter.html
    http://www.datapigtechnologies.com/f...earchform.html

    Also sounds like you need dependent (cascading) comboboxes:
    http://www.datapigtechnologies.com/f...combobox2.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Daoud1987 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2013
    Location
    Algeria
    Posts
    3
    Thank you very much
    Yes what I want is to :

    - select a class that will display the list of students who belong to this class named for example cboClass
    - select a subject from another combobox named for example cbosubject
    - select a term (quarter) from a combobox named for example cboTerm

    why? because my junction table contains the following fields:
    Score ( scoreid, #studentid, #subjectid, #termid, test1, test2, finaltest )
    scoreid is the primary key for the score table and other fields: studentID, subjectid, termid are foreign keys
    So to fulfill this junction table I did not need foreign keys but I need data on these key because the end user can not remember the numbers to make them into the table but it needs:


    -the names of students who belong to a particular class
    -the names of subjects for which the student has been tested
    -names of terms (quarters) in which the tests were doing

    So i have to combine 5 tables : Class , Student , Subject , Term , Score

    Note : The list i want to have is something like this :

    studLastName studFirstName Test1 Test2 FinalTest

    Thank you in advance

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  5. #5
    Daoud1987 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2013
    Location
    Algeria
    Posts
    3
    Hi Thank you very much for your response
    But my problem is not about database structure or schema or about normalization my problem is how to enter data in junction table named Score , that's it

    Thanks in advance

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Did you try techniques in the posted links?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 12-14-2012, 04:21 PM
  2. How to use Junction Table to populate DB
    By Sorbz62 in forum Forms
    Replies: 1
    Last Post: 10-02-2011, 05:45 PM
  3. Replies: 4
    Last Post: 01-20-2011, 10:05 PM
  4. Table related to multiple tables by single ID
    By MrTumnus in forum Access
    Replies: 1
    Last Post: 11-17-2009, 02:05 PM
  5. Split a table into related tables
    By triley01 in forum Database Design
    Replies: 1
    Last Post: 03-12-2009, 02:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums