how to combine IIf statement in query

  • Thread starter Thread starter xiaodan86
  • Start date Start date
X

xiaodan86

I wish to performed some calculation if the condition meet.
If there is more than one iif statement to be include, how can i
combine together?

for example:

Minutes: IIf([start]>DateAdd("d",-1,[forms]![datedaily1]![date] And
[end]<[forms]![datedaily1]![date]),DateDiff("n",[start],[end]))

Minutes: IIf([start]<DateAdd("d",-1,[forms]![datedaily1]![date] And
[end]<[forms]![datedaily1]![date]),DateDiff("n",DateAdd("d",-1,[forms]!
[datedaily1]![date]),[end]))

how can i combine this two statement in one field in the query?
 
Back
Top