Results 1 to 4 of 4
  1. #1
    Humm_tasty is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1

    Angry Employee Database - Multiple records with Primary Key

    Hi All,


    I am creating a database for employee records.
    Each employee has their unique ID
    When an employee has a change in thier employment, (EG receives a promotion or a salary increase), I would like to be able to keep a record of this update. For example the data would read:
    Jo Bloggs New Joiner 1st Jan 2018 salary of 5USD
    Jo Bloggs Promotion 1st Jan 2019 SAlary of 7USD
    This would cause the unique ID to have multiple entries. If i remove it as primary key then how do I maintain the data accuracy with its relationship to the rest of the employee database. If i unlink it, then how does the database know to read the most current dated entry.

    I am so stuck.

    Help me please!

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Use a separate linked table with the same primary key field and your salary info field.
    This will be linked to the main table as a one to many join

    You then use a query based on the two tables to view all records for an employee or all employees
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    Join Date
    Apr 2017
    Posts
    1,792
    tblEmployees: EmployeeID, ForeName, LastName, ...
    tblAppointments: AppointmentID, AppointmentCode, Appointment, ...
    tblDepartments: DepartmentID, DepartmentNo, Department, ...
    tblEmplAppointments: EAID, AppointmentDate, EmployeeID, AppointmentID
    tblEmplDepartments: EDID, DepartmentDate, EmployeeID, DepartmentID
    tblEmplSalaries: ESID, SalaryDate, EmployeeID, Salary

  4. #4
    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,870
    Humm,

    I suggest you do some research on Database Concepts and Design and Normalization.
    I realize you are new here, but your post highlights you are also new to database.
    Here's a link with lots of related info. I recommend you watch a few videos for background/overview,
    and then work through 1 or 2 tutorials from RogersAccessLibrary identified in the linked material.
    You will learn more in 30 minutes than a week/month or 2 of trial and error.

    Good luck.

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

Similar Threads

  1. Database Design to Maintain Inactive Employee Records
    By Tylin in forum Database Design
    Replies: 6
    Last Post: 03-03-2018, 01:11 PM
  2. Replies: 2
    Last Post: 12-09-2014, 03:32 AM
  3. Multiple records assigned to one Employee
    By Bosakie in forum Forms
    Replies: 3
    Last Post: 10-08-2014, 09:29 AM
  4. Employee Training Records Database
    By Jules050585 in forum Database Design
    Replies: 2
    Last Post: 08-02-2012, 09:17 AM
  5. Employee Training Records
    By Penn State Girl in forum Database Design
    Replies: 8
    Last Post: 06-06-2011, 08: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