SELECT Inspection_Reports.ID, Inspection_Reports.Part, Inspection_Reports.InspBy, Inspection_Reports.Date,
[Data-Table].ToolID, [Data-Table].Failed, Inspection_Reports.Vendr, [Data-Table].Notes
FROM Inspection_Reports LEFT JOIN [Data-Table] ON Inspection_Reports.[ID] = [Data-Table].[ID]
WHERE (
(NZ([Forms]![ReportLauncher]![TXTID],"")="" Or [Inspection_Reports].[ID]=[Forms]![ReportLauncher]![TXTID])
AND (NZ([Forms]![ReportLauncher]![TXTPART],"")="" Or [Inspection_Reports].[part]=[Forms]![ReportLauncher]![TXTPART])
AND (NZ([Forms]![ReportLauncher]![TXTINSPBY],"")="" Or [Inspection_Reports].[INSPBY]=[Forms]![ReportLauncher]![TXTINSPBY])
AND (Inspection_Reports.Date Between #6/13/2008# And #8/13/2009#)
AND (NZ([Forms]![ReportLauncher]![TXTTOOLID],"")="" Or [Inspection_Reports].[TOOLID]=[Forms]![ReportLauncher]![TXTTOOLID])
AND (NZ([Forms]![ReportLauncher]![TXTFAILED],"")="" Or [Inspection_Reports].[FAILED]=[Forms]![ReportLauncher]![TXTFAILED])
AND (NZ([Forms]![ReportLauncher]![TXTVENDOR],"")="" Or [Inspection_Reports].[VENDR]=[Forms]![ReportLauncher]![TXTVENDOR])
AND (NZ([Forms]![ReportLauncher]![TXTNOTES],"")="" Or [Inspection_Reports].[NOTES]=[Forms]![ReportLauncher]![TXTNOTES])
)
ORDER BY Inspection_Reports.ID;
|