working an overtime program

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to write an access program to work out overtime. The concept is that
there are three different pay brackets (£5,£7,£9) .Overtime is paid at time
and a half after 40 hours worked in each bracket. I can get the pay bracket
from the user, and the hours worked using inputboxes. So far I have got the
program to run this information when 40 hours or less is put in but can not
work out the overtime part(when the hours is > than 40 hours)
Any ideas. Thank-you
 
How about this?
(Remember to declare variables, or reference table fields)
I don't know what data you are actually using though, here is an example...
Also, you need error handlers, like if the tax bracket is not 5, 7, or 9
output a message box saying it's an invalid tax bracket, then quit processing
the module and wait for the user's response again.

If (fldHours > 40)
hours = fldHours - 40

If (fldTaxBracket = 5)
rate = 1.5
elseif (fldTaxBracket = 7)
rate = 2.0
elseif (fldTaxBracket = 9)
rate = 2.5
endif

overtimePay = hours * rate

endif

Does that help any?
 
Back
Top