Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wildcard * not showing Null entries

Status
Not open for further replies.

CharlieT302

Instructor
Mar 17, 2005
406
US
Hi Folks,

I am using a wildcard in an IIF statement for a query criteria. It works fine but will not display Null entries.

Here is the criteria:
Like IIf([forms]![frm Assessment Pending Filter].[allSup]=0,[forms]![frm Assessment Pending Filter].[SupSelect],"*")

How can this be modified to show "All" and "Null" entries if [allsup]=0(see the "*" at the very end of the statement)

Thanks
 
Add this to the SQL statment for string field
Code:
Where nz(FieldName,"")= IIf([forms]![frm Assessment Pending Filter].[allSup]=0,[forms]![frm Assessment Pending Filter].[SupSelect],nz(FieldName,""))
this for numric field

Code:
Where nz(FieldName,0)= IIf([forms]![frm Assessment Pending Filter].[allSup]=0,[forms]![frm Assessment Pending Filter].[SupSelect],nz(FieldName,0))
 
In the criteria cell:
=[forms]![frm Assessment Pending Filter]![SupSelect] OR [forms]![frm Assessment Pending Filter]![allSup]=0

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top