Here's the offending code:
As near as I can tell I have Then and Else conditions for each IIf statement, all my parentheses are closed off. I tried it as
but got the same error.
Essentially this is a single nested IIf, checking for the presence of [SuspendDate] and [ResumeDate] and calculating the days elapsed appropriately.
That is, if there is no [SuspendDate], then subtract the [ReceivedDate] from the current date. If there is a [SuspendDate] but no [Resumedate] then subtract the [SuspendDate] from the Current Date. Lastly, if there is both a [SuspendDate] and a [ResumeDate] then subtract the time in suspension from the total ellapsed time.
Any ideas?
Thanks, Rob
Code:
IIf(IsNull([SuspendDate]),(Date()-[DateReceived]),IIf(Isnull([ResumeDate]),
([SuspendDate]-[DateRecieved]),(([Date()-[DateReceived])-([ResumeDate]-[SuspendDate])))
AS Queue
As near as I can tell I have Then and Else conditions for each IIf statement, all my parentheses are closed off. I tried it as
Code:
Queue:IIf(IsNull(...
but got the same error.
Essentially this is a single nested IIf, checking for the presence of [SuspendDate] and [ResumeDate] and calculating the days elapsed appropriately.
That is, if there is no [SuspendDate], then subtract the [ReceivedDate] from the current date. If there is a [SuspendDate] but no [Resumedate] then subtract the [SuspendDate] from the Current Date. Lastly, if there is both a [SuspendDate] and a [ResumeDate] then subtract the time in suspension from the total ellapsed time.
Any ideas?
Thanks, Rob