Hey guys. I am losing my mind. I am getting the error "Extra ) in query expression "pending reqs")'
Can somebody help me figure this out? My mind is melting. I can't get the syntax error fixed. This if statement is huge. Not even sure I got it all coded correctly. I've pasted both the IF statement logic and the IIF script below. I'm sorry for the trouble Thank you.
if(Atty Signed <> “”, “Pending Filing”
if(Complt Ver Recd <> “”, “Pending Signature”
if(Complt Ver Sent <> “”, “Pending Client Verification”
if(Complt Drafted <> “”, “Pending Send to Client”
if(Exam Complete <> “”, “Pending Draft”
if(AND(OR(BrchLtr RecCorr <> “”,Brch Ltr Waived <> “”),OR(Orig Note Recd <> “”,LNA Recd <> “”),AND(Chain of Title Correct <> “”,Chain of Title = “Correct”, OR(Chain of Title Incorrect = “”,Chain of Title Incorrect < Chain of Title Correct)), Title Rpt Recd <> “”), “Pending Exam”, “Pending Reqs”
Code:
IIF([TITLE.AttySigned] is not null,"Pending Filing",
IIF([TITLE.Compltverrecd] is not null,"Pending Signature",
IIF([TITLE.Compltversent] is not null,"Pending Client Verification",
IIF([TITLE.CompltDrafted]is not null,"Pending Send to Client",
IIF([TITLE.ExamComplete],"Pending Draft",
IIF(([TITLE.brchltrreccorr]is not null OR [TITLE.brchltrwaived] is not null) AND
([ODOC.OrigNoteRecd] is not null OR [ODOC.LNARecd] is not null) AND
([ODOC.ChainofTitleCorrect] is not null AND [ODOC.ChainofTitle]="Correct" AND ([ODOC.ChainofTitleIncorrect] is null OR [ODOC.ChainofTitleIncorrect] < [ODOC.ChainofTitleCorrect])) AND
[TITLE.TitleRptRecd] is not null)))))),"Pending Exam","Pending Reqs") as PendingComplaint