Hi guys.
I have a query that displays the total number of records from another query that counts them, and the total number of records that contain ‘Yes’ in one of the fields from another query. The issue is, if there are no records that contain ‘Yes’, I get null, when I actually need a ‘0’.
I will paste the SQL code below. Currently, when I run the query, it is asking me for a value for ‘CountofDB Part Number’, and what ever value I type in, shows up in the query.
Thank you in advance for your help!
KST
*********
SELECT qry_Order_List_BO_Count_of_All.[CountOfDB Part ID], IIf([CountofDB Part Number] Is Null Or [CountofDB Part Number]=””,0,[CountofDB Part Number]) AS My_Field
FROM qry_Order_List_BO_Count_of_All LEFT JOIN qry_Order_List_BO_Count_of_YES ON qry_Order_List_BO_Count_of_All.[Order ID] = qry_Order_List_BO_Count_of_YES.[Order ID];