2 Replies Latest reply on Aug 23, 2011 12:54 PM by KenClose

    Entering Data into a Join Table

    KenClose

      Title

      Entering Data into a Join Table

      Post

      Hello: First post here with a real newbie question, but one I have been working on for days to no avail.  I have set up, for training purposes, a simple set of tables for a Student/Course mini db.  Of course, I have a join table to connect the two other tables, but am at a loss of how to add records so the thing all works.

      Student Table: Student ID, Name

      Course Table: Course ID, Course Name

      Join Table: StudentID, Course ID .... but what else, and where and how to rig a form to enter new record data. And into which table(s) are the records entered? 

      I believe I would populate the Courses table ahead of time, manually.  But then new students would be added, with Course selection from a drop down list.  But where?  How?

      This is so seemingly simple I am embarrassed to ask but yet I can not find any guidance on such a simple task. Who is willing to help me?

      Thanks so much,

      Ken

        • 1. Re: Entering Data into a Join Table
          philmodjunk

          Enter students into new records created on a layout based on the Student Table. Enter courses into new records created on the Course table.

          Use a portal to Join placed on a student layout, to link that student to existing courses records. Use a portal to the join table on a courses layout to link students to the current course.

          Student---<Join>----Course

          student::StudentID = Join::StudentID  //enable "Allow creation of records via this relationship" for Join here
          Course::CourseID = Join::CourseID //enable "allow creation of records via this relationship" for Join here.

          In a portal on the student layout, add a drop down or pop up menu for selecting the course. In a portal on the course layout add a drop down or pop up for selecting a student.

          Here's a demo file that matches contracts to companies in a many to many relationship:  http://www.4shared.com/file/PLhjErzu/Contracts_to_Companies.html

          • 2. Re: Entering Data into a Join Table
            KenClose

            Many thanks for the file and the explanation.  That will get me out of my mental logjam....

            Ken