Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with a formula

Status
Not open for further replies.

slaga9

Technical User
Jun 8, 2007
46
CA
Iv recently run into a problem with the database I have been creating.
It stems from two user-entered fields, hours paid, and hours worked.

The user enters information at weekend (employee, job number, hours worked, hours paid, pay period end)
the information then gets exported into excel

I need to enter a condition into the hours paid combo box.
It needs to be done in access rather then excel because of the formatting in the excel document.

I need a formula that would do the following
hours paid equals hours worked up until (and including) the 44th hour, every hour beyond that gets multiplied by 1.5

is this possible? any ideas how? and Would I enter that in the "on update" property of the combo box?

Thanks for your time
-SL
 
Try this out?

Basically, if hours <= 44, you want to just show HoursWorked for HoursPaid.

If > 44, you want to show 44 + (the difference between 44 and hours worked, multiplied by 1.5)

Code:
HoursPaid = iif(HoursWorked <= 44, HoursWorked, 44 + ((HoursWorked - 44) * 1.5))

Hope this helps,

Alex

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
thanks! this should take care of it!
SL
 
I think it should anyway ;-)

Hope it works for you :)

Alex

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top