=DLookUp(Forms![PayRate]![Years],"[BasePay]","[Rate] = '" & [Forms]![PayRate]![Grade] & "'")=DLookUp("=Forms![PayRate]![Years]","[BasePay]","[Rate] = '" & [Forms]![PayRate]![Grade] & "'") - doesn't work, but if I do:
=DLookUp("[5]","[BasePay]","[Rate] = '" & [Forms]![PayRate]![Grade] & "'"), I get the proper dollar amount for someone with the grade and 5 years of service. Unfortunately, only for 5 years. Once I bring up the next employee, I get the wrong amount because they may have only 4 years or might have 10, etc.
It's an one-time work for couple of hours.
Isn't there some formula applicable. E.g. you have a base pay, and some coefficient per year allowing calculate the pay depending on seniority in years.
BasePayID - an autonumeric primary key (I prefer to keep them short).