need help with expression

safam

New member
Local time
Today, 07:16
Joined
Aug 11, 2014
Messages
7
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]
 
Is this in a Query?
Code:
KPI = Nz([DeliveryDate], Date()) -[SubDate]
 
sorry i forgot to mention.
this is a code i am running on a form.
 
You had the idea so you could have looked up the IIF() function:
Code:
IIF(IsNull([DeliveryDate]), Date()-[SubDate], [DeliveryDate]-[SubDate])
 
thanks,vbaInet. works like a charm.

thanks for the quick response guys.
 

Users who are viewing this thread

Back
Top Bottom