Results 1 to 4 of 4
  1. #1
    jerryg72 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2021
    Posts
    5

    Post How to prevent the calculation structure when a field value is revised?

    I have a database of employees with their salary and other perks included. When I make their salary slip each month the amount is calculated based on the basic pay and their perks which includes housing allowance, transportation allowance and couple other allowances. When I make a change on any of the allowances from now onwards the calculation is affected for the previous months as well. How can I prevent this happening. How can the previous months pay slip stay with the previous allowance as it was and the new calculation affects from the current month onwards? Thank you.
    Last edited by jerryg72; 03-23-2023 at 04:27 AM.

  2. #2
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    232
    There are mainly two ways.
    The first is to store for each month the amounts that are actually paid per Employee.
    The other method is to make a table where you store all changes in allowances, so you will know which amounts applies in a certain month.
    Groeten,

    Peter

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    I would add to xps35's other method that the (history of) allowances table should contain an 'effective from' date. Your payslip would then look up the the allowance which was in effect on the date of the payslip.

    My own preference when you have a legal document (such as a payslip, sales invoice etc) is to store all the values that apply to that document. That way it can be reproduced accurately at any time in the future regardless of any modifications to the underlying data.

    I may well still maintain a history table as well as it might be relevant for other reports, contain additional information of interest such as why the value is changing, perhaps a link to an authorisation, etc. An example of this might be basic pay. An employee changes role to one on a different pay grade midway through a pay period, so part of the basic pay for the pay period is on one rate, and part on another.

  4. #4
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    third method: generate a PDF when new pay slips are generated and store the pdf's. For some legal documents this might be required.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-25-2018, 06:08 AM
  2. Replies: 1
    Last Post: 12-10-2017, 01:47 AM
  3. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  4. Replies: 4
    Last Post: 04-05-2012, 01:00 PM
  5. Update the Date on a revised Record
    By pas49 in forum Access
    Replies: 0
    Last Post: 03-15-2011, 12:55 PM

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