p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   Payroll in Access (Revised Posting) (http://p2p.wrox.com/showthread.php?t=48445)

bright_mulenga September 29th, 2006 02:19 AM

Payroll in Access (Revised Posting)
Revised posting
I have started developing a simple payroll system using access. for the tax bands I have put them directly in the the code and it is calculating well. Now I need help in the following

In order to handle my calculations easily, I created two tables:
(A relationship has been created using the primary key EmployeeID)
1. tblemployeedetails; with the following fields
EmployeeID(primary Key),Name,Gender,Department,Address,
National_Registration_number,StartofContractDate(e ach contract runs for one year starting 1st April of each year)
,leavedays_per_month,Cummulative_leaveDasyTodate(c alculated for the date of start of contract),DateOfBirth,Age (calculated from the date of birth)

2.tblincomeandDeductions; with the following fields;
ID(which is just a serial counter with datatype Autonumber)
employeeid,Date(Of running the payroll,
Incomes-Dollar pay(Salaries are pegged in dollars),Basic pay(in local currency calculated),Rate(Exchange rate of the dollar for the particular month),Allowance1,
Deductions-Tax (with tax bands calculated on the local currency as follows 260,000 tax = 0, Next 720,000 tax = 30%,the rest taxed at 35%),Pension tax (calculated at 5% of the Gross pay),Personal Levy tax (calculated at 1% of the GrossPay),Advance deduction,Total Deductions,
Both incomes and deductions are in the same table. All the tax calculations are incorporated in the VBA code on form

1.Is there another way of incorporating the tax band % calculations other than puting them straight in the code
2.Help me with code combination that continues to calculate the cummulative tax year todate
2. How do I close a particular month and automatically create new records for another month and carry over the cummulative figures. Because as it is it means that I have to create new records `for each employee every month manually

when the tax bands are changed, it means that I have to go into the code and change the percentages

I need help

Bright Mulenga


sola October 5th, 2006 10:12 AM

let me start from the bottom
3.to automatically enter data use an insert query
by going to database window,query,design new and open
  then find the type of query and enter (append)
 this is how the query will look like
 u are inserting records in the tbleincome and deductions

in the append from dialog box,enter append to current database,and enter table income and deductions as the table name

in the append what
enter the name of the fields e:g dollar pay for the append from,and beneath it,dollar pay as the append to field.

do likewise for all fields except date(of running payroll)
when u get to date field do the following

 under append what (type expr1:date()
 under append to (type the name of the date field )i:e date.
  under criteria enter date()-30
 what this means is that all records in your income/deductions table will be duplicated where the date is today -30days(lastmonth's record alone)

also the date in the new records will be set to today[date()]fuctions.

please remember on the show table options to show the 2 tables(tbl employee details and income/deductions table)

i have assumed while explainig that u are familaiar with the query design.

 next u will create a command button that when clicked will run the query.

sola October 5th, 2006 10:17 AM

for question 2
 cummulative tax to date

u will have to create a report with the following fields

then under tax u sum the tax field.
 if u use the report wizarf,it will take u by step by step,also under group by,enter emplyee name.

All times are GMT -4. The time now is 04:16 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.