IIF statement, Between 2 dates or one date is null

tucker61

Registered User.
Local time
Yesterday, 16:34
Joined
Jan 13, 2008
Messages
344
I have the code below that looks between 2 dates. and returns a 1 if the value is true.

Problem i have is that sometimes the Date_Removed is blank (Because the supplier has not been removed from the list) so how do i amend to include or iif date removed is null ?

Code:
Targeted: IIf([Delivery_Date]>[tblQCSupplierWatch]![Date_added] And [Delivery_Date]<[tblqcsupplierwatch]![date_Removed],1)
 
Wrap the DateRemoved in a Nz() with a replacement date that will give you the result you want if the Data isn't there.

And [Delivery_Date]< NZ([tblqcsupplierwatch]![date_Removed],Date())

Would substitute today if it was missing.
 

Users who are viewing this thread

Back
Top Bottom