Results 1 to 4 of 4
  1. #1
    3Khats is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    2

    Connecting Company Table to Staff Table

    I am starting a database and have set up all the tables and need to join the company table to the staff table. What is the best way to do this. Also it is highly probable that two companies could have the same name and they are two different companies in two different states.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In the company table I'd expect you to have an ID field of some sort to differentiate the companies. It can be a number you create/use, or an autonumber field that only the system sees, but either way that's the field that would be used to join with other tables.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    3Khats is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    2

    Joining Clinic to Staff

    I did it this way
    I took the primary key IDClinic from the company table and joined it to a field in the staff table that is called IDClinicStaff in a one to many relationship. When I enter the data it chooses record number 2 and 4 for the first clinic records. I just want to make sure I am creating it correctly before I start adding more data.

    Was this the best way or should I have made a field called IDClinicStaff in both tables and joined them to each other?

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Presuming a staff person can only be at one clinic, I'm fine with having a field for that in the staff table. I'd personally give it the same name (IDClinic) so it was obvious that it contained the same data, but that's me. If I work at clinic ID 123 then in my staff record I expect to see that 123, regardless of what you name the field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 10-31-2012, 01:27 PM
  2. Replies: 8
    Last Post: 03-22-2012, 08:48 AM
  3. Connecting to a new table in the BE
    By Jamescdawson in forum Access
    Replies: 5
    Last Post: 02-06-2012, 03:57 PM
  4. Staff table feeds many tables
    By geoffishere in forum Database Design
    Replies: 0
    Last Post: 03-18-2010, 01:56 PM
  5. Replies: 2
    Last Post: 10-27-2009, 07:09 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