Results 1 to 5 of 5
  1. #1
    geekaysys is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    6

    Link two table

    Dear Sir,



    I would like to link the 2 tables with multiple IDs

    for example. I have table COMPANYT and DIRECTORT

    hear DIRECTORID to be linked to moret than once COMPANYID.

    Same like that COMPANYID also need to be linked to more than one DIRECTORTID

    For example.

    Company 1 have more than 1 director, linked to DIRECTOR 1 and Director 3

    Director 1 to be linked to Company 1 and Company 4

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Then you want a 3rd table, CoDirectorsT
    coID, DirID

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    you are describing a many to many relationship. To manage that you need an additional linking table - something like

    CompanyT
    CompanyPK autonumber primary key
    CompanyName text
    ....
    ....

    DirectorT
    DirectorPK autonumber
    DirectorName text
    ....
    ....

    LinkT
    LinkPK autonumber primary key
    CompanyFK long, indexed, duplicates OK - links to CompanyPK in companyT
    DirectorFK long, indexed, duplicates OK - links to DirectorPK in director

    You may also need a multifield index - no duplicates for CompanyFK and DirectorFK so you can't make someone a director of the same company twice

  4. #4
    geekaysys is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    6
    Sorry Ajax.

    My question is not clear. It is not Link two table.

    It is Retrieve or fill up field from 2nd Table.

    On the CompanyT Data Entry DIRECTOR Field to be pick up from DirectorT
    After pick up the Director ID from DirectorT, display Director Name and Director ID to display for pickup in drop down list.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I'm sorry I do not understand what you are asking. Suggest rather than describing what you want show some example data and the result required. Your question is 2 1/2 years old

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

Similar Threads

  1. Replies: 5
    Last Post: 06-18-2014, 01:54 PM
  2. Replies: 1
    Last Post: 06-11-2014, 11:38 AM
  3. Replies: 8
    Last Post: 01-27-2014, 12:41 PM
  4. Replies: 2
    Last Post: 12-20-2011, 07:33 AM
  5. Replies: 2
    Last Post: 08-01-2011, 11:35 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