Results 1 to 3 of 3
  1. #1
    dipzta is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    3

    Question 3 empoyeeID to 3 different fields to one Table

    Hi.This one is a hard nut;I want to fill out a Workshop order. (car repair for example)I then use the WorkOrderTable and also have an EmployeeTableSo, this order will be received by one empoyee, it will be designated to one employee(mechanic), and it will be signed out by one employee when the workorder is done.(The "one" employee can be different persons from the EmployeeTable)So how I put up the relationships with these conditions and tables?(I believe I must have a junction table, but how do we connect these?)Or can I just relate EmployeeID from EmployeeTable 3 times to 3 different fields in WorkOrdreTable ?Thank you

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,426
    you do this

    just relate EmployeeID from EmployeeTable 3 times to 3 different fields in WorkOrdreTable
    to do this, draw the relationship line. After the first one you will be prompted with 'a relationship already exists'. Click no to create the new relationship. An 'alias' table will appear of your employee table (suffixed with _1). This is just the way these multiple relationships are displayed

    you can use a junction table - and probably better if there is a change in your procedure (for example work needs to be signed off by more than one person, more than one mechanic can work on the vehicle, etc)

    to have a junction table you would also need a table for 'roles', then your junction table would look like

    WOrderFK....RoleFK....EmployeeFK
    1.................1...........3
    1..................2..........4
    1.................3...........5
    1..................2..........5

    assuming role2 is mechanic, this says 2 mechanics worked on the works order, one of which signed off the work

  3. #3
    dipzta is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    3
    Thank you!I am a 1 week noob, so now I will study this answer and try it (PS: I did earlier tried this "just relate EmployeeID from EmployeeTable 3 times to 3 different fields in WorkOrdreTable" but it didnt work. I guess I did it wrong)Edit: I tried again, and now it worked! The table in the relationship window cloned itself with the _1 _2 etc suffix as you said, so then I know I was on the right track Thanks!

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

Similar Threads

  1. Replies: 3
    Last Post: 12-02-2017, 02:04 PM
  2. Replies: 2
    Last Post: 11-27-2017, 08:59 PM
  3. Replies: 2
    Last Post: 06-05-2013, 03:18 PM
  4. Replies: 1
    Last Post: 07-06-2012, 05:32 PM
  5. Replies: 11
    Last Post: 09-15-2011, 03:52 PM

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