G
Guest
I'd like to create an if-then statment for calculating hourly/salary yearly
totals. I have a field that holds a dollar amount that is either a monthly
amount or an hourly rate [PayRate] and another field that determines whether
the employee is hourly or salary [PayType]. What I need to do is calculate
the yearly (estimated) pay for any given employee. So basically it goes: If
[PayType]=Salary Then [PayRate]*12 or If [PayType]=Hourly Then
[PayRate]*2080 (2,080 hours per year based on a 40 hour work week). I want
this calculation to land in a text box on a form [txtPayCalc]. I'm just not
sure of the exact syntax to use for this calculation and where the code
should go (After Update Event maybe?). Still kinda new at the coding thing.
totals. I have a field that holds a dollar amount that is either a monthly
amount or an hourly rate [PayRate] and another field that determines whether
the employee is hourly or salary [PayType]. What I need to do is calculate
the yearly (estimated) pay for any given employee. So basically it goes: If
[PayType]=Salary Then [PayRate]*12 or If [PayType]=Hourly Then
[PayRate]*2080 (2,080 hours per year based on a 40 hour work week). I want
this calculation to land in a text box on a form [txtPayCalc]. I'm just not
sure of the exact syntax to use for this calculation and where the code
should go (After Update Event maybe?). Still kinda new at the coding thing.