Hello guys,
I am trying to create a query, that one column has this IIF statement... First Off, I have a field named Est_Date_Of_Completion which is a date field, and a checkbox IndexingOnHold...
I created this IIF statement in a query
and whenever I run the query,, for the fields that have Est_Date_Of_Completion IsNull and IndexingOnHold = -1 (checked) it returns #ERROR...
But whenever I try to have the iif statement the other way around:
it doesn't give the #ERROR but for Est_Date_Of_Completion IsNull and IndexingOnHold = 0... it still gives the ON HOLD result...
any help is greatly appreciated.
Thanks
I am trying to create a query, that one column has this IIF statement... First Off, I have a field named Est_Date_Of_Completion which is a date field, and a checkbox IndexingOnHold...
I created this IIF statement in a query
Code:
IIf([Situs_Est_Date_Of_Completion] Is Null And [IndexingOnHold]=0,[Situs_Est_Date_Of_Completion],IIf([Situs_Est_Date_Of_Completion] Is Null And [IndexingOnHold]-1,"ON HOLD",[Situs_Est_Date_Of_Completion]))
and whenever I run the query,, for the fields that have Est_Date_Of_Completion IsNull and IndexingOnHold = -1 (checked) it returns #ERROR...
But whenever I try to have the iif statement the other way around:
Code:
IIf([Est_Date_Of_Completion] Is Null And [IndexingOnHold]-1,"On Hold", IIF([Est_Date_Of_Completion] is null and [IndexingOnHold] 0,[Est_Date_Of_Completion],[Est_Date_Of_Completion])
it doesn't give the #ERROR but for Est_Date_Of_Completion IsNull and IndexingOnHold = 0... it still gives the ON HOLD result...
any help is greatly appreciated.
Thanks