M
Melissa
Hi there
I have a table for "tblshifts", which has "ShiftId" as the primary key, and
the fields are: "Employee", "ShiftDate", NoOfShiftsNormal",
"NoOfShiftsSunday", "TotalShifts", etc. Then I have another table for
"tblPayroll", - primary key "PayrollId"; fields include deductions (UIF,
Pension, loans), and also "ShiftId" related to the tblShifts table.
Each time I create a new "Payslip" in tblPayroll, a new line (record) is
added in the tblPayroll table with a new "PayrollId", but then , the same
"ShiftId" appears more than once if those various shifts occurred within the
same time period (in the parameter query). Therefore on my "rptPayslip", I
have a textbox which calculated the "TotalNoOfShifts" worked, and because
the tblPayroll shows the same ShiftId more than once, when the report
calculates the Sum of "TotalNoOfShifts", it adds the same shift more than
once - which therefore results in incorrect calculations.
Here is a detail of my "qryPayroll" query for my "rptPayslip":
(ShiftId) (CompanyId) (tblShiftsEmployeeId) (Client)
(Date) (NoOfShiftsNormal) (PayrollId)
19 8 LESLIE ABC
01/01/2009 1 21
19 8 LESLIE ABC
01/01/2009 1 22
19 8 LESLIE ABC
01/01/2009 1 23
I did not include all the fields from my query, just enough to show that
each time a new PayrollId is created for a new payslip, the same ShiftId
comes up, therefore interfering with the "TotalShiftsWorked" total on the
report: "rptPayslip".
Any advise would be greatly appreciated. Please advise if you require any
further details
Thank you
Melissa
I have a table for "tblshifts", which has "ShiftId" as the primary key, and
the fields are: "Employee", "ShiftDate", NoOfShiftsNormal",
"NoOfShiftsSunday", "TotalShifts", etc. Then I have another table for
"tblPayroll", - primary key "PayrollId"; fields include deductions (UIF,
Pension, loans), and also "ShiftId" related to the tblShifts table.
Each time I create a new "Payslip" in tblPayroll, a new line (record) is
added in the tblPayroll table with a new "PayrollId", but then , the same
"ShiftId" appears more than once if those various shifts occurred within the
same time period (in the parameter query). Therefore on my "rptPayslip", I
have a textbox which calculated the "TotalNoOfShifts" worked, and because
the tblPayroll shows the same ShiftId more than once, when the report
calculates the Sum of "TotalNoOfShifts", it adds the same shift more than
once - which therefore results in incorrect calculations.
Here is a detail of my "qryPayroll" query for my "rptPayslip":
(ShiftId) (CompanyId) (tblShiftsEmployeeId) (Client)
(Date) (NoOfShiftsNormal) (PayrollId)
19 8 LESLIE ABC
01/01/2009 1 21
19 8 LESLIE ABC
01/01/2009 1 22
19 8 LESLIE ABC
01/01/2009 1 23
I did not include all the fields from my query, just enough to show that
each time a new PayrollId is created for a new payslip, the same ShiftId
comes up, therefore interfering with the "TotalShiftsWorked" total on the
report: "rptPayslip".
Any advise would be greatly appreciated. Please advise if you require any
further details
Thank you
Melissa