Results 1 to 3 of 3
  1. #1
    DLee-AB is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    3

    Working with relationships

    I'm a relatively new user of Access, and I can't seem to wrap my head around relationships. I have 4 tables, Employees, Classification, Emergency Contacts, and Courses. I want to add sub-forms of 3 of the tables to an Employee form which I've created. This is where I'm confused... Do I create fields for the primary keys for Classification, Emergency Contacts and Courses tables in the Employee table? If so then once I have these fields do I then copy the Primary Key numbers into the blank fields on the Employee Table? I've checked out different sites and even tutorials on YouTube, but nowhere have I found clearly explains this.

    Thanks so much.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Employee can have multiple Classifications, multiple Contacts, multiple Courses? If Yes, these tables should have a field for the EmpID as FK.

    Use form/subform arrangement with main form bound to Employees and subforms bound to other 3 tables.

    Set the Master/Child links properties of the subform container control and the EmpID PK will automatically save as FK in the subform records.
    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 XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Before deciding on forms and subforms, I recommend you get your tables and relationships set up. Do you have a clear statement of what you are trying to do in business terms? Do you have a set of Business Rules --Does every Employee have to have an EmergencyContact?-- Can an Employee have only One Classification at one time? Take some sample data and "work it" against your data model. Reconcile every anomaly/issue.

    For Relationships -- see and work through this tutorial.

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

Similar Threads

  1. Zooming commands when working with relationships
    By jamal numan in forum Access
    Replies: 2
    Last Post: 07-19-2013, 03:28 PM
  2. Explicit Relationships and Implicit Relationships
    By Dazza666 in forum Database Design
    Replies: 2
    Last Post: 07-17-2013, 02:11 AM
  3. Dsum was working now it is not working
    By ssalem in forum Reports
    Replies: 7
    Last Post: 04-18-2013, 02:57 PM
  4. Replies: 3
    Last Post: 01-29-2013, 04:34 AM
  5. Relationships not working as expected
    By Poepol in forum Access
    Replies: 1
    Last Post: 04-29-2011, 05:39 AM

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