raziel3
Registered User.
- Local time
- Today, 11:30
- Joined
- Oct 5, 2017
- Messages
- 273
Good day all,
I have a parameter query(qyrYTD) that returns the Year-to-Date Gross of an employee once the user inputs the Employee Name(EName) and the Ending Payroll Period(PE)
I have used DSums/Dlookups in the past and they tend to crash my database so I am looking for a way to move away from that. How can I use the Recordset function on the query mentioned above? I want to return the YTD Gross on a report field once the Employee Name matches.
I have a parameter query(qyrYTD) that returns the Year-to-Date Gross of an employee once the user inputs the Employee Name(EName) and the Ending Payroll Period(PE)
Code:
SELECT Employees.EName, Sum(qryPayroll.GROSS) AS SGROSS, Sum(qryPayroll.ENIS) AS SENIS, Sum(qryPayroll.HS) AS SHS, Sum(qryPayroll.PAYE) AS SPAYE
FROM qryPayroll INNER JOIN Employees ON qryPayroll.EID = Employees.EID
WHERE (((qryPayroll.PE) Between DateSerial(Year([Enter Date]),1,1) And [Enter Date]))
GROUP BY Employees.EName
HAVING (((Employees.EName)=[Enter Name]));
I have used DSums/Dlookups in the past and they tend to crash my database so I am looking for a way to move away from that. How can I use the Recordset function on the query mentioned above? I want to return the YTD Gross on a report field once the Employee Name matches.