Results 1 to 4 of 4
  1. #1
    kgoepel is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2017
    Posts
    4

    Setup Companies with multiple contacts but now also need contacts to link to multiple companies

    We have a database where the Company Data has a Company ID that links up to Contact Data by each contact record containing the Company ID. This has been fine up to now where I am faced with an issue where I have contacts who need to link up with more than one company. I don't want to have 2 records for the same person so I though I could maybe create a separate table that contains just and Contact ID and Company ID and edit the relationships to use the new table to link the two.



    At the moment it works nicely in the Company Data Form where I have a page tab with contact subform to add contacts and it automatically gives the contact a new reference and automatically fills in the correct Company ID and ideally I would like to not lose this so I thought I need to keep autonumber for contact ID on the new separate table (with just Contact ID and Company ID). I have tried this and everything is still working apart from the part where I add multiple company ID's to the contact record in my separate contact form. I thought adding a page tab to this form with a subform for the new table (just Contact ID and Company ID) would work, it allows you to add a new record but automatically allocates a new contact ID rather than picking up the contact ID from the record your in. How do I make this allow a new record and keep the same contact ID?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,522
    contacts can have many companies....and vice versa

    tPeople table
    PersonID (auto)
    name,etc

    tCo table
    CoID (auto)

    tContacts table
    PersonID (long)
    CoID (long)

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Click image for larger version. 

Name:	CompanyContacts_DraftModel.jpg 
Views:	8 
Size:	20.7 KB 
ID:	30004
    This is the sort of design you will need since a Contact could be associated with more than 1 company.

    Good luck.
    (ignore the mis-spelling Conatact)

  4. #4
    kgoepel is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2017
    Posts
    4
    Thank you so much for your help. I hope you have a great weekend!

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

Similar Threads

  1. Replies: 14
    Last Post: 03-21-2017, 07:00 AM
  2. Replies: 4
    Last Post: 12-16-2016, 01:24 PM
  3. Replies: 5
    Last Post: 04-20-2014, 10:51 PM
  4. Replies: 1
    Last Post: 12-03-2013, 10:40 AM
  5. Multiple Companies Same Invoice
    By mikajake in forum Database Design
    Replies: 3
    Last Post: 02-28-2013, 01:39 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