Parameter Query - Wildcard not showing null value records

Monsora83

Registered User.
Local time
Today, 06:33
Joined
May 16, 2011
Messages
41
I am trying to get a query to show all records if Field1 in Form1 is blank. However the results are either: I will get proper filtered results when Field1 is not blank (ok good) OR when it is blank I recieve everything except records with null values (@#$%).

Am I missing something? Thanks for any help.

Like Nz([Forms]![Form1].[Field1],"*")
 
Null is not a "value" so nothing can be Like Null. You need to contruct a different criterion to include Nulls
 
Well I managed to figure it out.

Changed the query setup to:

Field Name: Dummy Name: Nz([Tbl_1].[Field1],"")
Query Parameter: Like IIf(IsNull([Forms]![Form1].[Field1])=True,"*",[Forms]![Form1].[Field1])

Since a Null value is not included with a wildcard "*" search, the Field Name will change any Null value to an empty string "". Now my blank records can be included when the wildcard "*" criteria is used based on my Query Parameter.

Attached is an image of my exact setup for reference.
 

Users who are viewing this thread

Back
Top Bottom