Results 1 to 7 of 7
  1. #1
    BDibz is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2018
    Posts
    62

    Question Confusion with many-to-one relations

    I'm trying to have each jobNumber have one partID, and each partID to have several electrodeIDs tied to it. I thought that the setup that I have here would accomplish this. However, as you can see, when I look at the parts table, each partID shows all of the electrodeID's and not just the ones that correspond to that part. Why is this? How can I make sure it only is tied to the corresponding parts?



    Click image for larger version. 

Name:	2.JPG 
Views:	16 
Size:	22.6 KB 
ID:	32778

    Click image for larger version. 

Name:	1.JPG 
Views:	16 
Size:	47.6 KB 
ID:	32779

    Click image for larger version. 

Name:	0.JPG 
Views:	16 
Size:	44.1 KB 
ID:	32780

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    BDibz,
    It would be easier for readers to understand and respond if you could describe the business activity in simple, clear English. We don't know what a Job involves nor how an electrode relates to a part.

    Can you tell us about a Job?
    What parts are involved?
    And where the electrodes fit in this picture?

    I think a simple example might clear things up.

    Good luck.

    Here is a link to info on Database Planning and design.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I built your tables and set relationships as you show. The subdatasheet correctly displays.

    partID and electrodeID should not be in both tables. With the relationship you show, electrodeID should be removed from tblParts
    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.

  4. #4
    BDibz is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2018
    Posts
    62
    Quote Originally Posted by June7 View Post
    I built your tables and set relationships as you show. The subdatasheet correctly displays.
    You were able to get it to display the subdatasheet with only records with the correct partID? I rebuilt my relationships and still cannot get this to show correctly. Are you sure you didn't do anything differently?

  5. #5
    BDibz is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2018
    Posts
    62
    Quote Originally Posted by orange View Post
    BDibz,
    It would be easier for readers to understand and respond if you could describe the business activity in simple, clear English. We don't know what a Job involves nor how an electrode relates to a part.

    Can you tell us about a Job?
    What parts are involved?
    And where the electrodes fit in this picture?
    Sure thing.

    A job is similar to an order: it is a request for a certain number of parts. It will have a job number that is the PK, a partID that is the part ordered, and the quantity of parts ordered.
    Each part requires certain electrodes in order to be made. One electrode can be used for a certain amount of parts before it needs to be replaced - for this reason I will add a "parts per electrode" column into the inventory table.
    The purpose of this database is to maintain an inventory of electrodes; what is currently on hand, and what is the gap between the forecast Jobs and the current inventory.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    My relationship links show an arrowhead on the infinite side. This means I set a different JOIN type. So changed to remove the arrowhead (INNER join) and the Subdatasheet still correct.

    Also, the partID does not show in the subdatasheet. Don't know why it does in yours.
    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.

  7. #7
    BDibz is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2018
    Posts
    62
    Quote Originally Posted by June7 View Post
    My relationship links show an arrowhead on the infinite side. This means I set a different JOIN type. So changed to remove the arrowhead (INNER join) and the Subdatasheet still correct.

    Also, the partID does not show in the subdatasheet. Don't know why it does in yours.
    That was it! Needed to change the join type. Works like a charm, thank you!

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

Similar Threads

  1. Combo Box Confusion
    By hfreedman1957 in forum Forms
    Replies: 10
    Last Post: 05-25-2017, 09:07 AM
  2. DLL Confusion
    By frankvfox in forum Access
    Replies: 6
    Last Post: 08-11-2013, 07:22 AM
  3. Confusion with table relations
    By BusDriver3 in forum Database Design
    Replies: 13
    Last Post: 08-21-2011, 01:48 PM
  4. VB and SQL confusion
    By Wayne311 in forum Programming
    Replies: 29
    Last Post: 01-31-2011, 10:27 PM
  5. Confusion
    By colenzo in forum Access
    Replies: 4
    Last Post: 07-21-2009, 06:38 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