Question : Query using "like (iif)" statement as criteria filters out records with null values

I have a query that uses the values on a form to retrieve its criteria. Here is an example of the code I put into the Query in design view to retrieve the criteria. This makes it easier for the end users since all they have to do is open a form, punch what they want as their criteria into the fields they want to use and just click a button.

But the problem is that when using the code below as the field criteria (basically using like "*") this filters out all records that have a null value within the ID field (or whatever field is being queried). Is there a way to modify this code so that it doesn't hide the records that have any null values.

Or is there a better way to do this so I don't have  to force users to learn how to design and build queries to get their data.
Code Snippet:
1:
Like (IIf(NZ([Forms]![ReportLauncher]![TXTID],"")="","*",[Forms]![ReportLauncher]![TXTID]))

Answer : Query using "like (iif)" statement as criteria filters out records with null values

Think your brackets were off.  I organized a bit to try to clear up.  See if this works better.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
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;
Random Solutions  
 
programming4us programming4us