Alpha Video Training
Results 1 to 8 of 8

Thread: Too many links in a set

  1. #1
    Daniel King
    Guest

    Default Too many links in a set

    Hello,
    There must be a better way to do this.
    I have a form that shows "employee#" and I would like to bring in the "employee name" from the employee table (the main table only contains codes).
    Without doing 60 links in the set, how can I set it up so when an employee# is selected from a drop down box, the employee name is presented on the screen too?
    Thanks.

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Too many links in a set

    Don't understand the "60 links". You only need to link the main table to the employee table once based on employee id (I assume that's the field in both tables) and show the employee table employee name on the form.

    IOW the main table should have employee ids and the employee table should have employee id, employee name, and other employee data.

  3. #3
    Daniel King
    Guest

    Default RE: Too many links in a set

    I'm sorry I should have been a little more specific. There are approx. 60 unique fields (job positions)with employee# as the field value. I would like to be able to allow the input person to select from a list for each of the unique job position fields and display the employee name on the form.
    My thought was I would have to do a link for emp_code (JobPosition1) to the emp_code in the Employee table for each of the unique JobPositions(1-60).

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Too many links in a set

    Ahhhh, another spreadsheet guy appears!

    Daniel, databases work best if information is organized differently than you describe. Instead of sixty fields each of which will hold a single value, you will be far better off with a single field that can hold any of sixty different values.

    -- tom

  5. #5
    Member
    Real Name
    Sherrill Stott
    Join Date
    Jan 2001
    Location
    E. Harwich, MA
    Posts
    87

    Default RE: Too many links in a set

    Is this for a business with 60 positions which are relatively static, or are you creating personnel lists for jobs, each of which has 60 positions which are filled from a central employee table?

    In the first case (static employee list), I would use three tables:

    parent - your main table, with fields for position code and employee code. Perhaps also date filled, other info relative to the hiring.

    child table 1, linked one to one by position code - positions, each record containing a position code, position title, other info about the position.

    child table 2, linked one to one by employee number - employees, each record containing an employee code, name, etc.

    In the second case (multiple jobs), four tables:

    parent - jobs, with each record containing info about a specific job, including a job code.

    child, linked one to many by job code - a linking table, containing all the same info as the parent from the first case above plus a field for job code.

    grandchild 1, linked one to one - positions, see child table 1 above.

    grandchild 2, linked one to one - employees, see child table 2 above.

    With this setup, you can use a form with an embedded browse or a report to show who fills each position for a given job. Or, by creating other set configurations using the same tables, you could get a list of all the jobs an employee has worked, all the different positions an employee has filled, all the employees who have filled a particular position at some time, etc.

    Good luck!

    Sherrill

  6. #6
    Daniel King
    Guest

    Default RE: Too many links in a set

    Wow! What a dynamic forum!!! We are truly very lucky to have such a "sounding board"!
    Basically what I am doing is creating a rough schedule for employees each with a different role. The input process is pretty sound. A table has been created containing fields for the unique job positions which reference an employee master to get employee data.
    My problem is for viewing purposes, I would like to show the name of each employee for each of the job positions. On a smaller scale I have accomplished this by creating multiple links within the set and physically dragging/dropping the name from link1, link2, link3... to the appropriate positions on the form.
    There must be something I am missing here. Does a table link need to occur for each job position when the key will always be the same - empl#? Again, this is just for display purposes.

  7. #7
    "Certified" Alphaholic Scott Emerick's Avatar
    Real Name
    Scott Emerick
    Join Date
    Dec 2000
    Location
    Central Virginia/ North Carolina Border
    Posts
    2,154

    Default RE: Too many links in a set

    Daniel,

    I would like to show the name of each employee for each of the job positions.

    Make a set as follows:

    Parent Table - Job Positions
    Child Table - Employee's Linked as 1 to many, Linking field "Position_No"

    If an employee holds mutiple positions then create a new table structured with the following fields:

    Job_No, Position_No, Employee_No

    Now replace the child table with this one with the same links.

    An easy way to think of this is to use a Invoice type structure where instead of Invoice_header as the parent table you have Postions. Instead of the invoice_line_items you have either employee or jobs.

    Hope this helps you,

    Scott

  8. #8
    "Certified" Alphaholic
    Real Name
    JohnZaleski
    Join Date
    Oct 2000
    Posts
    1,736

    Default RE: Too many links in a set

    Although I agree that there might be better ways to design tables to accomplish your goal, you might want to investigate the following function:

    LOOKUPC(

    as a way of retrieving the name of an employee with a known employee ID.

Similar Threads

  1. Links
    By Terry Mudge in forum Alpha Five Version 4
    Replies: 5
    Last Post: 09-24-2002, 01:23 PM
  2. Set links misbehave
    By Stephen Williams in forum Alpha Five Version 4
    Replies: 2
    Last Post: 03-07-2002, 08:34 AM
  3. Many to many links in a set, I think?
    By BDennis in forum Alpha Five Version 4
    Replies: 8
    Last Post: 12-03-2001, 12:31 PM
  4. Set Links don't work??
    By Bob Kieffer in forum Alpha Five Version 4
    Replies: 1
    Last Post: 08-06-2001, 05:26 PM
  5. BAD LINKS
    By Hendrik Krosschell in forum Alpha Five Version 4
    Replies: 4
    Last Post: 01-18-2001, 05:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •