Results 1 to 2 of 2
  1. #1
    hesca is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    14

    Question Tables: How do I know which relationships to use?

    Hello experts. Im trying to create a student database for my guitar students. It basically comprises lists of students under one single subject: guitar lessons. Every student has a schedule: one weekly session at the same date/time every week.
    So, hereīs my question: How do I create a form that shows information from several tables without relational errors?

    I want to create a form with information from 3 different tables, all of which contain autonumber primary keys:

    Table 1: Registered: contains the names of the registered students. Fields: StudentName, schedule, teacher, registering date
    Table 2. Schedule change: contains the schedule changes for a specific person. I.E. Changing from Monday 4pm to Tuesday 3pm. Fields: studentName, old schedule, new schedule, change date
    Table 3. Free sessions: all justified absences entitle the student to get a free session. Fields: StudentName, Absent date, free session date and time

    So, I want to show the information for single records on this form: make it contain the studentīs details from the "registered" table and also their history of free sessions and schedule changes. So Im creating "one to many" relationships between the primary keys and the name fields, in order to create the logic of "every student has many free sessions" and "every student has many schedule changes".

    When I create the form and add tables #2 and #3, the following happens:
    a) The existing entries show on table 3.
    b) table 2 shows empty even when it contains entries under that student name
    c) When I try to manipulate either table the following error pops:



    "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. Change the data in the fields that contain duplicate data, remove index, or redefine the index to permit duplicate entries and try again"

    What am I doing wrong? Any suggestions?
    What kind of relationships do you recommend between which fields?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You'll want to look at using subforms for your subsets of data. Base the main form on the client, then have two subforms, one to their schedule, one to their free sessions, link both subforms to the main from via the studentID.

    Once you have this set up you can edit the student's information in the subforms and on the main form individually.

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

Similar Threads

  1. Many to Many Relationships among 8 tables
    By Pilotwings_64 in forum Database Design
    Replies: 9
    Last Post: 10-30-2010, 03:12 AM
  2. 8 Tables with Relationships
    By bigdogxv in forum Access
    Replies: 1
    Last Post: 12-09-2009, 09:37 PM
  3. Tables Vs Relationships
    By Bruzer in forum Database Design
    Replies: 8
    Last Post: 09-06-2009, 04:39 PM
  4. Relationships btw tables
    By metaDM in forum Queries
    Replies: 0
    Last Post: 03-05-2009, 12:15 PM
  5. I need help on relationships for tables.
    By justin.w in forum Access
    Replies: 0
    Last Post: 10-16-2006, 10:57 AM

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