I am getting the "ambiguous outer Join" message on the following:
And I can't quite figure out what I need to separate out and create a different query with. I thought it was pretty straight forward (at least visually) and I have a hard time seeing it in SQL.
I am trying to Join tblAudits to JUNCtbl_Audit_AuditItems on auditID, and select all records from tblAudits, but only the corresponding records from the Junction table. I am not able to select that option (number 2 in the Access dialog box). I can only select the option where there are records in both.
Any direction is always appreciated!
Code:
SELECT JUNCtblAudit_AuditItems.auditDingsID, JUNCtblAudit_AuditItems.subCatID, JUNCtblAudit_AuditItems.noLongerValid, JUNCtblMainCat_SubCat.mainCatSubCatID, JUNCtblMainCat_SubCat.mainCatID, tblAudits.auditID, tblAudits.auditorName, tblAudits.auditDate, tblAudits.auditProvName, tblAudits.auditProvID, tblAudits.dateAuditRecd, tblAudits.dateRepCompleted, tblAudits.dateRepRecd, tblAudits.auditType, tblAudits.repAudited, tblAudits.delEntity, tblAudits.newHireAudit, tblAudits.auditID, tblAudits.extraNotes, IIf([newHireAudit]=True,"New Hire Audit","Regular Audit") AS switchIt
FROM (tblSubCat INNER JOIN (tblMainCat INNER JOIN JUNCtblMainCat_SubCat ON tblMainCat.mainCatID = JUNCtblMainCat_SubCat.mainCatID) ON tblSubCat.subCatID = JUNCtblMainCat_SubCat.subCatID) INNER JOIN (tblContacts INNER JOIN (tblAudits LEFT JOIN JUNCtblAudit_AuditItems ON tblAudits.auditID = JUNCtblAudit_AuditItems.auditID) ON tblContacts.contactID = tblAudits.repAudited) ON tblSubCat.subCatID = JUNCtblAudit_AuditItems.subCatID
WHERE (((JUNCtblAudit_AuditItems.noLongerValid)<>True));
And I can't quite figure out what I need to separate out and create a different query with. I thought it was pretty straight forward (at least visually) and I have a hard time seeing it in SQL.
I am trying to Join tblAudits to JUNCtbl_Audit_AuditItems on auditID, and select all records from tblAudits, but only the corresponding records from the Junction table. I am not able to select that option (number 2 in the Access dialog box). I can only select the option where there are records in both.
Any direction is always appreciated!