S safam New member Local time Today, 07:16 Joined Aug 11, 2014 Messages 7 Aug 21, 2014 #1 can any one please give me an expression, what i am trying to achieve is: KPI=[DeliveryDate]-[SubDate] if [DeliveryDate]IS NULL, Date()-[SubDate] OR [DeliveryDate]-[SubDate]
can any one please give me an expression, what i am trying to achieve is: KPI=[DeliveryDate]-[SubDate] if [DeliveryDate]IS NULL, Date()-[SubDate] OR [DeliveryDate]-[SubDate]
pr2-eugin Super Moderator Local time Today, 15:16 Joined Nov 30, 2011 Messages 8,494 Aug 21, 2014 #2 Is this in a Query? Code: KPI = Nz([DeliveryDate], Date()) -[SubDate]
S safam New member Local time Today, 07:16 Joined Aug 11, 2014 Messages 7 Aug 21, 2014 #3 sorry i forgot to mention. this is a code i am running on a form.
V vbaInet AWF VIP Local time Today, 15:16 Joined Jan 22, 2010 Messages 26,374 Aug 21, 2014 #4 You had the idea so you could have looked up the IIF() function: Code: IIF(IsNull([DeliveryDate]), Date()-[SubDate], [DeliveryDate]-[SubDate])
You had the idea so you could have looked up the IIF() function: Code: IIF(IsNull([DeliveryDate]), Date()-[SubDate], [DeliveryDate]-[SubDate])
S safam New member Local time Today, 07:16 Joined Aug 11, 2014 Messages 7 Aug 24, 2014 #5 thanks,vbaInet. works like a charm. thanks for the quick response guys.