Another query...formulae query

E

Enderjit Singh

I am trying to set up a query ideally as a module in vb to
do the following:

Date1 minus Date 2 (If Date2 IS NULL) then minus Date 3,
giving a return value in weeks or days. Can anyone help?
 
N

Newbie

You can set this as the control source of a text box

=IIf(IsNull([DTE2]),DateDiff("d",[DTE1],[DTE3]),DateDiff("d",[DTE1],[DTE2]))

HTH
Al
 
Top