Results 1 to 5 of 5
  1. #1
    student_2744 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    5

    Linking multiple tables in a many-to-many relationship using query to achieve auto-fill forms

    Greetings,
    MS Acess noob here.

    I am creating a student management system database using Microsoft Access and I need help.

    Click image for larger version. 

Name:	RTLSS.jpeg 
Views:	15 
Size:	30.7 KB 
ID:	40600
    The image above summarizes all the relationships that I have between my tables. I am aiming to create a student management database in which users are allowed to add new students, subjects, teachers, or marks (meaning assesment grades) to the data.

    Now, I have the basics figured out. As can be seen from above, I have created a many-to-many relationship between Students and Subjects, where many students can have many subjects and vice versa. My problem is that I now want to link the explained relationship to my tblMarkssssss (you can just call it tblMarks long story). So, my aim is that when a student_ID is selected for a Markssssss_ID from a form or somewhere, fields automatically appear that specify what each of the 6 subjects of the student is. To give an example, if Julie Andrews took subjects A,B,C,D,E,F, when her ID/ Name is selected in the tblMarkssssss, there will be an auto-fill in the fields (established by a relationship between tblStudents, tblSubjects, tblMarkssssss) specifying the name of each subject of the tblMarkssssss.

    I feel like I am almost 100% missing fields in my tblMarkssssss, but I generally do not know what path to follow to achieve my aim. Alsp, my limited knowledge of MS Access yields that a query will almost most certainly be involved in this process. Hence my posting of this thread in the Queries subcategory.



    If what I am asking for is practical for a database, any help as to how I can go about creating this relationship would be welcomed. If not, a nudge in the right direction would be appreciated.

    If you have any questions, I am here to elaborate. Thank you in advance for all the help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    tblMarks is not a normalized data structure. Why isn't term and grade maintained in Students2Subjects?

    Students2Subjects should NOT have name fields.
    Last edited by June7; 01-05-2020 at 03:59 AM.
    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
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  4. #4
    student_2744 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    5
    So you're saying that my junction table Students2Subjects should have the term and grade fields so that I can link it to tblmarks by adding field relationships?

    Thank you for the resources.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    I could be wrong about where Term fields should be located. Explain what they are for.

    Multiple similar name fields indicates non-normalized structure.

    I had hard time reading that image and just noticed you have 6 sets of 3 associated fields. At first I thought that was 18 distinct Subject fields. Either way, this is not normalized. What if you need a 7th set or more someday?

    What do M, P, C represent?

    Quite possibly tblMarks should link to or replace Students2Subjects. Can student receive multiple marks for a subject?
    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: 6
    Last Post: 04-16-2019, 12:05 PM
  2. Replies: 25
    Last Post: 10-15-2014, 11:01 AM
  3. Replies: 5
    Last Post: 10-04-2011, 12:53 PM
  4. Auto-Fill one field, two tables, two forms
    By Swilliams987 in forum Forms
    Replies: 1
    Last Post: 01-21-2011, 12:43 PM
  5. Auto fill-in text box on forms
    By windwardmi in forum Forms
    Replies: 7
    Last Post: 09-13-2010, 02:47 PM

Tags for this Thread

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