SELECT dt.DocumentTypeID, dt.DocumentType, dt.ContractorID, tblContractorDocuments.DocumentNumber, tblContractorDocuments.ExpireDate
FROM (SELECT tblContractors.ContractorID, luDocumentTypes.DocumentTypeID, luDocumentTypes.DocumentType
FROM luDocumentTypes, tblContractors
WHERE (((luDocumentTypes.IsInsurance)=True))
ORDER BY tblContractors.ContractorID, luDocumentTypes.DocumentType) AS dt LEFT JOIN tblContractorDocuments ON (dt.DocumentTypeID = tblContractorDocuments.DocumentTypeID) AND (dt.ContractorID = tblContractorDocuments.ContractorID)
|