Topics Search

Paye - Calculate At Runtime Or Store The Deduction?

Paye - Calculate At Runtime Or Store The Deduction?
Views: 0
I have a payroll system that works for my environment and one of the things about any payroll is tax deductions and remittance. I have a function called GetTax that calculates the required tax deductions from each employee based on their earnings using pre-defined Payroll Brackets/Range, Salary Cut Off and Tax Rate in mytblPayrollTaxSettings.

Since this is a calculated figure I obviously doesn't store it in any table but call GetTax(TotalEarning) at runtime when creating payslips, viewing payrollrecords or printing reports.

However, the tax rules in my country was changed recently which requires that I modify the tax brackets, salary cut off and tax rates in my tblPayrollTaxSettings. previous pay runs will no longer reflect the old deductions but with deductions using the new tax rates.

Now this got me thinking.should I have stored the calculated PAYE deductions in thetblPayrollDeductions table along with other salary deductions and with these new tax I would still have had my payment history reflecting what each employee was paid previously?
Sponsored Links:

More topics


Payroll - Complex If Statement for PAYE

I am trying to build a small payroll and so far everything has been OK until now. The challange I have is calculating the PAYE (Pay As You Earn) personal tax from the employee total earning.

I my country the tax rate for PAYE is applied on a graduated scale as shown below:

- First $30,000 at 5%
- Next $30,000 at 10%
- Next $50,000 at 15%
- Next $50,000 at 20%
- Above $160,000 at 25%

So what I want is for my textbox "txtPAYE to evaluate "txtEarning" based on those garduated scale with an IF statement. I don't know how possible that is. It would have been very strait forward for me if it was for a tax that has a constant rate

Query Help: MS Access and FileMaker Pro

I am writing my first database app (windows form in c#) and I am using an access database. I have 2 tables with the following fields:
payroll: (Store, lastName, PayFreq, SSN (PK), HireDate, EffectiveDate, TermDate, DeductionCode, Deduction, NAD CHAR) AND hrconnection: (Store, lastName, CoTime, Plan, Dependants, HireDate, EffectiveDate, TermDate, SSN (PK), Deduction).
I want to find the records based on SSN that are in the payroll table and are not in the hrconnection tables and then find the record based on SSN that are in the hrconnection but are not in the paypal table.

Store Value or Calculate

I started my project several month back to relearn Access after being away from Access for many years. One of my original question was about storing a calculated value and after some discussion I decided to store the value. Now I need to revisit this decision.

I receive, after the fact, sales information which I import, add some extra information, and produce some meaningful reports. There is onearea that I am doing circles on and hence my question.

This represent the quantity on hand by product group by sales day. The value to calculate is the quantity on hand at the end of the day which will then be used as the opening quantity for tomorrow.

Option 1: Should I store this end of day quantity and then run a query, or a dlookup, to find yesterdays end of day quantity to calculate todays end of day quantity?


Option 2: Should I create some starting amount and then run a query to calculate yesterdays end of day quantity?

The basic structure for the stock table is:

Calculate Average of a field

I have two tables, the first stores data related to observations visits for patients and the second stores data used to create an executive dashboard monthly. What I need to do is take one of the fields in the observations table and average it out and store it in the dashboard table for monthly and YTD reporting.

Does anyone know how to calculate the average of a field in onetable and store it in another?

I have the SQL that accurately calculates the average of the field, I just can't get it to store in the other table's field.

Report with Running Sum by week

I have a report is built off of a query that contains the following fields:


I would like to be able to keep a running total of how much the employee has contributed each payroll based on his deduction. The payroll is bi-weekly so there are 26 periods in the year.

the payroll dedution amount is a calculated amount based on the annual contrbutuion/26

I was hoping that I could have a field on my report that would allow me to key in the week number and it would calculate the Sum of his dedcutions but I can not find a way for this to work.

Will this work or is there a better way to go about getting this information onto my report.

DSum in Query

DSum in Query
I have a financial database that has many Tables, each table has many fields primarily holding currency data.

I understand from research that it is incorrect to calculate and store a ‘result’ in a Table, so, I’ve created a Query in order to calculate and store my result which is the TOTAL of all the currency fields in a given record. From my research, I believe the best way of doing that is to add an extra currency field to my Table so the field name is there for when I build my query (still holding with the idea you shouldn’t store a result in the Table itself).

I’ve entered the following formula into the Query by using the ZOOM feature (it is entered into the filed column [WkCashInUnTOT]. The syntax looks like this:

Using a Query to Set a Field equal to a Sum

I'm using Access 2007, and I want to calculate the sum of a field in one table and store that sum in another field in another table. I don't expect the original field to change much so I don't want to use a query just to calculate the sum and display it, I want to actually store it and display it whenever I want. Something similar to what you would do in Excel, except with sums from different tables. And if the original field does change, I want the sum to also update and the field in the other table to update as well.

So, to simplify, here is the above broken down:

I have Table1 and Table2 and Field1 and Field2.

Table1 --> Field1
Table2 --> Field2

I want the Field2 = Sum of Field1. I've read everywhere it's better to just calculate the number rather than store it in a table, but I don't need the number to be recalculated since it will most likely never change

Store form calculations into table

I have a simple but large database to calculate the trade and selling price as well as store important information about our products.
I have imported an excel file with the cost price and the trade and cash price already calculated. In my form I have made formulas to calculate the trade and cash price if the cost price needs to be changed, but I do not know how to save these values back to the table (update the trade and cash price when the cost price has changed).
I know a bit about Access, but nothing about macros and VBA.

Needing more info about using Access runtime vs. ACCDE

I'm trying to understand Access Runtime, as compared to an ACCDE file.

1) If I use Runtime, does it eliminate the need to hide the navigation pane, menus and ribbons?
2) Does it create an executable file that can be used on any computer, regardless of whether Access is installed or not?
3) Does Runtime need to be previously installed on the Users' computers?
4) Is a Runtime file a smaller footprint than an ACCDE?
5) Are there disadvantages to distributing a Runtime file instead of an ACCDE?

The sources I've found so far on Runtime are a bit confusing.

Access Runtime

Access 2007 & 2010 runtime. Has anyone used the runtime versions? I have an access report that uses a csv file for data. It works fine under the full version but the runtime does not open it