The below formula is counting the records that have null fields in the InspDate. What is wrong in the syntax?
=[YrInpDueG0]-Sum(IIf([FSL]=0,IIf(Not IsNull([Insp_Date]),1,0)))
The below formula is counting the records that have null fields in the InspDate. What is wrong in the syntax?
=[YrInpDueG0]-Sum(IIf([FSL]=0,IIf(Not IsNull([Insp_Date]),1,0)))
not sure, but thinking more than likely it's because you're using the visual basic syntax needed for NULL checking instead of the interface-based syntax. as far as I know, these are the general rules that seem compatible with acc:
interface work:
1) [field] is/is not NULL => e.g. ...... iif([field1] is not null, val1, val2)
2) [field] (operator) NULL => e.g. ...... iif([field1 = null, val1, val2)
visual basic:
1) if isnull([field]) => e.g. ...... iif(isnull([field1]), val1, val2)
2) if isnull([field]) = true => e.g. ...... iif(isnull([field1]) = true, val1, val2)
Ended up using =[YrInpDueG0]-Sum(IIf([FSL]=0,IIf([Insp_Date]<>" ",1,0)))