No filtering if a text box has a Null value. (1 Viewer)

Local time
Today, 21:56
Joined
May 14, 2020
Messages
32
Hi! Quick question I want to run a query that used as a datasheet table as a subform. I'd like the sheet to display all records if a CustomerID box is Null but filter IF the box has a value to just that customer ID. Is this possible? Thankyou have a fantastic day!
 

plog

Banishment Pending
Local time
Today, 15:56
Joined
May 11, 2011
Messages
11,646
Make a calculated field in your query, don't show it, but use it as criteria:

ShowRecord: Iif(Isnull([Forms]![YourFormName]![CustomerID]) OR [Forms]![YourFormName]![CustomerID]=[CustomerID], True,False)

Then under it make the criteria True.
 
Local time
Today, 21:56
Joined
May 14, 2020
Messages
32
Make a calculated field in your query, don't show it, but use it as criteria:

ShowRecord: Iif(Isnull([Forms]![YourFormName]![CustomerID]) OR [Forms]![YourFormName]![CustomerID]=[CustomerID], True,False)

Then under it make the criteria True.
Works beautifully! Thanks so much mate! :D Exactly what i needed! Have an awesome day !
 

Users who are viewing this thread

Top Bottom