IIF/IFelse and Dates?

papadega3000

Registered User.
Local time
Today, 18:51
Joined
Jun 21, 2007
Messages
80
I have a query that pulls out dates from a table and I am trying to build a formula in the query so it can tell me whether or not that item in the record is either on-time, due today, or overdue.
There will be two date inputs a planned date and a actual date. A simple example is this:
Status: IIf([Actual]<[Planned],"On Time"," Overdue")

But what I really need is to use a If else structure in the formula but I received error messages saying I couldn't use that syntax.

This is what I was trying to do.
psuedo code:

If( Actual <Planned)
On-time
ElseIf (Actual > Planned)
Overdue
Else( Actual=Planned)
Due Today

Is there anyway I could next two IIf()'s to make this work of is there another way to get this done?
 
Sure; you simply embed one IIf() within the appropriate clause of the other.
 
Okay... I was getting an syntax error with that... but I think I got it figured out...I just need to make false condition of one be the embedded iif().

Thanks.
 
If you continue to get an error, post the attempt and we'll sort it out.
 
I got it ... it was a stupid ). I was missing one. and it thought that I should have another argument because of not having one.

Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom