I am working on a payroll application. I am trying to generate reports and I'm having trouble creating a query to pull the info I need for one report.
I have all employees in a Master table. One of the fields is the Paycode which tells if an employee is Hourly or Salary.
The payroll hours are entered into another EmployeeHours table.
In my report I need to print all the Paycode 2(Salary) people (which is no problem) as Normal Salary unless hours have been entered for them (here is the problem), for this I need the information from the EmployeeHours table (records are not output for Salary people unless they have a change in Normal Salary), and I only want the employee printed once, either as Normal Salary or with the inputted hours.
I can not figure out how to create a query pulling all Paycode 2 people, with and without(again, records are not output for Salary people unless they have a change in Normal Salary)hours together.
Ex:
Emp#.......Reg Hrs
1..........Normal Salary (Would be pulled from Master as a Salary Person)
2..........42.00 (would be pulled from EmployHours as a change in normal)
3..........Normal Salary
4..........Normal Salary
5..........48.00
etc
I need to create a general query in the Access database to create the report, then in my code I want to sort it in the order the user wants (Alpha, Numeric etc).
At least this is how I have done the other reports
Hope this made at least a little sense. Thanks in advance for any help
Catrina
I have all employees in a Master table. One of the fields is the Paycode which tells if an employee is Hourly or Salary.
The payroll hours are entered into another EmployeeHours table.
In my report I need to print all the Paycode 2(Salary) people (which is no problem) as Normal Salary unless hours have been entered for them (here is the problem), for this I need the information from the EmployeeHours table (records are not output for Salary people unless they have a change in Normal Salary), and I only want the employee printed once, either as Normal Salary or with the inputted hours.
I can not figure out how to create a query pulling all Paycode 2 people, with and without(again, records are not output for Salary people unless they have a change in Normal Salary)hours together.
Ex:
Emp#.......Reg Hrs
1..........Normal Salary (Would be pulled from Master as a Salary Person)
2..........42.00 (would be pulled from EmployHours as a change in normal)
3..........Normal Salary
4..........Normal Salary
5..........48.00
etc
I need to create a general query in the Access database to create the report, then in my code I want to sort it in the order the user wants (Alpha, Numeric etc).
At least this is how I have done the other reports
Hope this made at least a little sense. Thanks in advance for any help
Catrina