iif - Issue with Specific Nested If Statement in MS Access -
i created nested iif statement in 2010 access , part works. there once line not populate correctly:
select iif([qrymarate]![commissionable], iif([qrymarate]![year]="2013", iif([forms]![frmmarate]![chktrueup], [qrymarate]![agentinitial], [qrymarate]![agentrenewal]), iif([forms]![frmmarate]![chktrueup], iif([qrymarate]![prorated], [qrymarate]![agentinitial]*([forms]![frmmarate]![cbomonth]/12), [qrymarate]![agentinitial]), <--- line not populate [qrymarate]![agentrenewal]*([forms]![frmmarate]![cbomonth]/12))), null) agentrate qrymarate;
the goal of statement pick out if there should commission amount , either display commission or pro-rate based upon month commission earned.
else in statement it's supposed 1 line. not matter put in line not populate.
easiest answer ever, iif statement not recognizing y , n possible t/f response, updated prorated iif statement to:
iif([qrymarate]![prorated] = "yes",
see comment above
select iif([qrymarate]![commissionable], iif([qrymarate]![year]="2013", iif([forms]![frmmarate]![chktrueup], [qrymarate]![agentinitial], [qrymarate]![agentrenewal]), iif([forms]![frmmarate]![chktrueup], iif([qrymarate]![prorated] = "y", [qrymarate]![agentinitial]*([forms]![frmmarate]![cbomonth]/12), [qrymarate]![agentinitial]), <--- line not populate [qrymarate]![agentrenewal]*([forms]![frmmarate]![cbomonth]/12))), null) agentrate qrymarate;
Comments
Post a Comment