conditional query on date field

Lifeseeker

Registered User.
Local time
Today, 06:44
Joined
Mar 18, 2011
Messages
273
Hello,

I have this query that tells users whether or not a particular issue is late or not.

The code is this and it's working now:

IIf(DateDiff("d",[Issue_Master]![Due_Date],Date())>0,"Late by " & DateDiff("d",[Issue_master]![Due_Date],Date()),"Due in " & Abs(DateDiff("d",[Issue_Master]![Due_Date],Date()))) & " days"


I have another field on the form that actually shows the status of the issue, which can be either complete or on-going, deferred.

How can I tweak the above query so that it won't show that an issue is late by x num of days even tho the issue already has a complete status?

comments/ thoughts much appreciated.
 
You could try something like:

IIf([Issue_Master]![Status]="Complete","Complete",IIf(DateDiff("d",[Issue_Master]![Due_Date],Date())>0,"Late by " & DateDiff("d",[Issue_master]![Due_Date],Date()),"Due in " & Abs(DateDiff("d",[Issue_Master]![Due_Date],Date()))) & " days")
 

Users who are viewing this thread

Back
Top Bottom