I am coming along with my Employee tracking database, much thanks to you all in the beginning. I have done some tweaking and working around somethings and now I have run into a brick wall on this latest tweakage.
I am looking to create a report that tracks the current job site of the employee. I cannot get any query I create to pull the last record of the employee number. I have been playing around and am thinking I may possibly need 2 queries and then join them to get the info I need. However, any time I try that using a Totals Query it will only use the PK and it will not let me try and use the FK for that table. What am I doing wrong???
Here is one of the queries I have been trying to work off which gets me halfway to what I want to see on the report.
I am looking to create a report that tracks the current job site of the employee. I cannot get any query I create to pull the last record of the employee number. I have been playing around and am thinking I may possibly need 2 queries and then join them to get the info I need. However, any time I try that using a Totals Query it will only use the PK and it will not let me try and use the FK for that table. What am I doing wrong???
Here is one of the queries I have been trying to work off which gets me halfway to what I want to see on the report.
Code:
SELECT tblEmp.EmployeeID, tblEmp.EmployeeName, tblEmp.EmploymentStatus, tblEmpInfo.EmpInfoID, tblEmpInfo.JobNumberFK, tblJobs.JobSite, tblEmp.CraftCode
FROM tblJobs INNER JOIN ((tblEmp INNER JOIN tblEmpRating ON tblEmp.EmployeeID = tblEmpRating.EmployeeID) INNER JOIN tblEmpInfo ON tblEmp.EmployeeID = tblEmpInfo.EmpIDFK) ON tblJobs.JobNum = tblEmpInfo.JobNumberFK;