Results 1 to 3 of 3
  1. #1
    amyhannah is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Dec 2013
    Posts
    1

    Creating a relationship between two tables

    I need to be able to make a relationship between these two tables.



    I have a student table and then an instructors table - I'm making a driving lesson booking system.

    I have included a picture of the two tables I have made so far.

    I want to link it so that when I am on the Instructors table (which holds all of the booked lessons) I can see the information of the student who has booked the lesson underneath.

    I am fairly new to Access so any help would be very much appreciated.

    Thank you.Click image for larger version. 

Name:	Table.jpg 
Views:	26 
Size:	36.9 KB 
ID:	14783

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I'd suggest you modify your table structure to be more normalized.

    1. Student Table (the table you have is just fine, just remove the chosen instructor)
    2. Instructor table (a table with your instructors, and any information directly related to them with an autonumber PK field)
    3. StudentInstructor table (a table with an autonumber PK, a FK to your student table and a FK to your instructor table)

    In other words on your table that is currently 'mel jones' you would, instead of having the student first and last you would just store the student ID, the student and instructor information could be looked up by linking your instruction table to your student table, and the student table then linked to your junction table and finally to your instructor table. It may seem convoluted but as you're doing development it'll be far easier to record all this information 1 time than to keep repeating it in multiple tables.

  3. #3
    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
    Amy,

    I agree with rpeare's comments, but I'm also suggesting a tutorial that will lead you from a Business description, to identifying entities and attributes, tables and relationships. The tutorial will elad you though these steps. It has answers also. I think it will help you with concepts that you can then apply to any database.

    see http://www.rogersaccesslibrary.com/T...lationship.zip

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

Similar Threads

  1. Replies: 5
    Last Post: 11-26-2013, 11:11 PM
  2. problems creating one to one relationship
    By alexthefourth in forum Access
    Replies: 5
    Last Post: 11-11-2013, 06:16 PM
  3. Creating relationship for multiple tables
    By dave john in forum Programming
    Replies: 1
    Last Post: 09-02-2012, 08:18 AM
  4. Creating a Relationship? (Having trouble)
    By lpmndcte in forum Access
    Replies: 3
    Last Post: 05-17-2012, 06:53 AM
  5. Replies: 6
    Last Post: 03-09-2012, 01:07 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