The following SQL statement (SQL view from a query) is only producing 1 record when their are multiple records matching the criteria. The relationships from the tables are
ProcessCheck(many) to (one)Candidates(many) to (one)Course(many) to (one)Project Manager. The intention is to produce a letter (via a report) to all candidates under a Project Manager that have not had one marked as sent. The letter needs to contain information on the candidate, course and Project manager. any body know why this won't produce all the relevant records
SELECT ProjectManagers.ProjManagerID, Candidates.Forename, [Forename] & " " & [surname] AS FullName, Candidates.Title, Candidates.Address1, Candidates.Address3, Candidates.Address4, Candidates.PostCode, ProjectManagers.Name, ProcessCheck.AssessDateSent
FROM ProjectManagers INNER JOIN (Course INNER JOIN (Candidates INNER JOIN ProcessCheck ON Candidates.CandidatesID = ProcessCheck.CandidateID) ON Course.CourseID = Candidates.CourseID) ON ProjectManagers.ProjManagerID = Course.ProjManagerID
WHERE (((ProjectManagers.ProjManagerID)=[Please enter Project ManagerID]) AND ((ProcessCheck.AssessDateSent) Is Null));
ProcessCheck(many) to (one)Candidates(many) to (one)Course(many) to (one)Project Manager. The intention is to produce a letter (via a report) to all candidates under a Project Manager that have not had one marked as sent. The letter needs to contain information on the candidate, course and Project manager. any body know why this won't produce all the relevant records
SELECT ProjectManagers.ProjManagerID, Candidates.Forename, [Forename] & " " & [surname] AS FullName, Candidates.Title, Candidates.Address1, Candidates.Address3, Candidates.Address4, Candidates.PostCode, ProjectManagers.Name, ProcessCheck.AssessDateSent
FROM ProjectManagers INNER JOIN (Course INNER JOIN (Candidates INNER JOIN ProcessCheck ON Candidates.CandidatesID = ProcessCheck.CandidateID) ON Course.CourseID = Candidates.CourseID) ON ProjectManagers.ProjManagerID = Course.ProjManagerID
WHERE (((ProjectManagers.ProjManagerID)=[Please enter Project ManagerID]) AND ((ProcessCheck.AssessDateSent) Is Null));