how to write condition in a query

X

xiaodan86

If I wan to perform some calculation in the query if the condition
meet, how can combine the below statement tgt in one field?

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]))

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

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

Any syntax needed in order to combine "IIf" statement?
 
J

Jeff Boyce

Already answered in another newsgroup.

If you feel your situation calls for posting in more than one newsgroup
(rarely necessary), post to all you select with a single post. That way, an
answer in one shows up in all. And the volunteers here don't duplicate each
other's efforts answering a post already answered.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top