Results 1 to 6 of 6
  1. #1
    RobertSmith is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Location
    Northridge CA
    Posts
    3

    Relationships to multiple copies of a table change after saving

    Hello all, first time forum poster. I hope I follow all conventions properly.

    I would like to create multiple relationships to a Person table.

    Person: PersonID (autonumber PK), LastName (text), FirstName (Text)
    Project: ProjectID (autonumber PK), ProjectName (text), ProjectOwner (Number, FK to Person)
    System: SystemID (autonumber PK), SystemName (text), TechnicalContact (Number FK to Person), BusinessContact (FK to Person)

    Relationships:
    Person.PersonID 1->many Project.ProjectOwner


    Person_1.PersonID 1->many System.TechnicalContact
    Person_2.PersonID 1->many System.BusinessContact

    I can set this up in the Relationships window without any problem. However, when I save the Relationships window, close and reopen I see:
    Person.PersonID 1->many Project.ProjectOwner
    Person.PersonID 1->many System.TechnicalContact
    Person_1.PersonID 1->many System.BusinessContact

    My ProjectOwner and TechnicalContact will be different, so this 'autorevised" model is not what I need.

    Has anyone experienced this type of behavior? Do you have suggestions on how to avoid this issue?

    Many thanks for any assistance.

    Bob
    Attached Files Attached Files

  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,902
    That is standard behavior.

    However, suggest you change the Join Type for each link to "Include all records from Project and only those from Person that match."
    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
    RobertSmith is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2014
    Location
    Northridge CA
    Posts
    3
    Hi June7. Thank you very much for replying. I agree the right joins are better and I have updated the relationships as you suggested.

    If the relationship remap is standard behavior, how do I model the desired situation where I have three different people: a ProjectOwner, a TechnicalContact and a BusinessContact, if the system is automatically forcing my ProjectOwner and TechnicalContact to be the same person?

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    The relationships in the diagram are correct. You need two occurrences of Person because the relationships between two tables cannot result in multiple (and different) recordsets at the same time. (I know - that is not explained very well).

    For any given person, there are two sets of records defined by relationships between Person and System. One set comes from the relationship using TechnicalContact, and the other from the relationship using BusinessContact.

    What Access is doing is separating them on the diagram to avoid the apparent conflict. It is only on the diagram - in reality the relationships don't conflict, and there is nothing that requires the ProjectOwner and TechnicalContact to be the same person.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Good explanation John_G.

    When you build queries, will have to include the Person table 2 times, for two joins to the two contact fields.
    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.

  6. #6
    RobertSmith is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2014
    Location
    Northridge CA
    Posts
    3
    Thank you both. I think I'm starting to get it. It seems the Relationships window is more a mechanism to maintain constraints. It is not necessarily an ER diagram.

    When I create a query to retrieve all of my info (adding an Interface table that links Project and System), MS Access will retain all of the table layouts in the query, including all copies of Person.

    I was just expecting this same behavior from the Relationships window, which was a bad expectation.

    Click image for larger version. 

Name:	FullInfo.gif 
Views:	7 
Size:	23.2 KB 
ID:	18955
    Attached Thumbnails Attached Thumbnails FullInfo.png  

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

Similar Threads

  1. Replies: 9
    Last Post: 08-26-2014, 10:43 AM
  2. Replies: 3
    Last Post: 02-04-2014, 04:33 PM
  3. Form not saving multiple records in Table
    By element32d in forum Forms
    Replies: 3
    Last Post: 05-14-2013, 01:32 PM
  4. Replies: 21
    Last Post: 10-05-2012, 11:36 AM
  5. How to create multiple table relationships
    By robi212 in forum Access
    Replies: 1
    Last Post: 03-30-2012, 07:59 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