I wrote the following query but it does not work:
IIf(Is Null ([Term])=Is Null, " ", (IIf([Term]<=5), "< 5 yrs",(IIf([Term]>5 AND ([Term])<=7),"7 yrs", (IIf([Term]>7 AND ([Term])<=10),"10 yrs", (IIf([Term]>10 AND ([Term])<=15),"15 yrs","> 15 yrs"))
When I count the round brackets in your expression, I got 13 open and 10 closed. I suspect you should have the same number each way.
If you write it out on a bit of paper, and for each open round bracket, label it with a letter (so, first one is a, second one is b...), and then find what you believe is the closing round bracket for a and label it a, and the same for b and so on, you should see where it is out of step. The format of IIF is IIF(expr,truepart,falsepart) - balanced round brackets.