IF Statement

Matizo

Registered User.
Local time
, 19:35
Joined
Oct 12, 2006
Messages
83
Hello Guys,

One question, maybe simple, maybe not but hopefully someone can help me,

I've got this:

IIf([tblWorks.WorkStartDate]<Date(),IIf([qEndDateForWork.WorkEndDate]<Date(),"Work Done","Work In Progress"),"Future Work") AS WorkStatus

besically, this takes the data from tblWorks and a query and compares the "Start Date" against the "WorkEndDate", and then shows the status of the work which can be: work in progress, work done or future work. How can I change this statement so that when there is no "Start Date" the status shown is "Potential Work"?

Thanks for help!
Matt
 
IIf([tblWorks.WorkStartDate]<Date(),IIf([qEndDateForWork.WorkEndDate]<Date(),"Work Done","Work In Progress"),"Future Work") AS WorkStatus

How can I change this statement so that when there is no "Start Date" the status shown is "Potential Work"?
Like this:
Code:
IIf([tblWorks.WorkStartDate]<Date(), IIf([qEndDateForWork.WorkEndDate]<Date(),
   "Work Done","Work In Progress"), [COLOR="Red"]IIF(tblWorks.WorkStartDate Is Null, 
      "Potential Work", "Future Work")[/COLOR]) AS WorkStatus
 
Thanks a lot! :D
 

Users who are viewing this thread

Back
Top Bottom