Formula to calculate overtime into amount paid

  • Thread starter Nancy via AccessMonster.com
  • Start date
N

Nancy via AccessMonster.com

I have a report based on a query that uses the following calculation in a
text box to calculate the total amount paid to an employee:

=([On Std Hours]+[Off Std Hours])*[Employee Data_Rate]

I would like to expand this formula to somehow multiply hours that are equal
to or less than 40 by the Employee Data_Rate. Then I would also like it to
take anything over 40 and multiply it by 1.5*Employee Data_Rate. These two
numbers should then be combined for the total amount paid to an employee
including overtime. Can this be done inside my report using a formula in a
text box? I'm fairly new to Access so step by step instructions would be
greatly appreciated.
 
G

ghetto_banjo

you could do this inside the textbox:

=iif([On Std Hours] + [Off Std Hours] > 40, (40 * [Employee
Data_Rate]) + ([On Std Hours] + [Off Std Hours] - 40) * [Employee
Data_Rate] * 1.5, [On Std Hours]+[Off Std Hours])*[Employee
Data_Rate] )
 
M

Marshall Barton

Nancy said:
I have a report based on a query that uses the following calculation in a
text box to calculate the total amount paid to an employee:

=([On Std Hours]+[Off Std Hours])*[Employee Data_Rate]

I would like to expand this formula to somehow multiply hours that are equal
to or less than 40 by the Employee Data_Rate. Then I would also like it to
take anything over 40 and multiply it by 1.5*Employee Data_Rate. These two
numbers should then be combined for the total amount paid to an employee
including overtime. Can this be done inside my report using a formula in a
text box?


Try this kind of expression:

=([On Std Hours]+[Off Std Hours] + IIF([On Std Hours]+[Off
Std Hours]>40, .5*([On Std Hours]+[Off Std Hours]-40), 0)) *
[Employee Data_Rate]
 
N

Nancy via AccessMonster.com

Thank you so much, that did the trick!

Marshall said:
I have a report based on a query that uses the following calculation in a
text box to calculate the total amount paid to an employee:
[quoted text clipped - 7 lines]
including overtime. Can this be done inside my report using a formula in a
text box?

Try this kind of expression:

=([On Std Hours]+[Off Std Hours] + IIF([On Std Hours]+[Off
Std Hours]>40, .5*([On Std Hours]+[Off Std Hours]-40), 0)) *
[Employee Data_Rate]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top