MS Access - nested/related tables in Forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markhutch
    New Member
    • Mar 2014
    • 2

    MS Access - nested/related tables in Forms

    I have the following structure:
    Code:
    Projects (table)
      projectID
      title
      other fields
    
      - Sections (table) relates to a project in Projects
         sectionID
         projectID (used to relate to Projects)
         section title
         other fields
    
         - Rules (table) relates to a section in Sections
            ruleID
            sectionID (used to relate to Sections)
            some fields
    
            - notes (table) relates to a specific rule in Rules
               noteID
               ruleID (used to relate to Rules)
               note field
    
           - ToDo (table) also relates to SAME rule as notes above in Rules
               todoID
               ruleID (used to relate to Rules)
    e.g. A rule has an ID of 99. All notes in notes table with ruleID=99 and all ToDo's in todo table with ruleID=99.

    What I want to do is have a form where I can scroll through Projects and display all the sections relating to that project. And scrolling through Sections display all the rules associated with that sections. Notes and ToDo's relating to each rule should then display.

    Further info: in Relationships - all the tables are related correctly to each other. My problem is how to build a form so that it
    a) displays all the various tables and
    b) changing a parent changes the children. E.g. going to the next rule, displays the Notes and ToDo's that relate to that rule.
    Last edited by zmbd; Mar 27 '14, 06:50 PM. Reason: [z{merged additional info from OP with OP}{added code tag to preserve OP's formatted section}]
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    Okay. First you would need to create your forms for the Notes and ToDo tables (I would recommend datasheet view). You would then create a form (I would recommend regular form view) for the Rules table and then add your Notes and ToDo forms as subforms. Then create a form for your Sections table and then add your Rules form as a subform. Then the same thing for Projects. This is probably the simplest method, but maybe not the most cosmetically appealing. There are sorts of things that can be done to improve it, but they all (at least the ones that I know) are variations of this model.

    Comment

    • markhutch
      New Member
      • Mar 2014
      • 2

      #3
      Thanks Seth. I'll try those and report back later.

      Comment

      Working...