??help

alexi

Registered User.
Local time
Tomorrow, 00:19
Joined
Feb 26, 2003
Messages
65
Can anyone help with this one?

I need to accrue Annual leave for full time employees.
It would be at the rate of 0.0547945 every day for 365 days to equal the 20 days of annual leave granted.

i need something to work out for each day then add that number to a running sum next to each employee name, and then a form or somethin to enter when leave is taken, and subtract it from the running sum?

is this at all possible?

any help appreciated.

TA
 
alexi,

In a perfect world ...

You'ld have a table that was incremented
(by a timer) to keep everybody's leave
balance up to date. It could fire at
every 0.0000000547945 milliseconds.

But seriously, in one table you need to
accrue their leave balance dynamically,
weekly, monthly, etc.

In another table you'd have the amount
of time they used on any date.

Then you can use simple queries to
determine the over/under computations
that you need.

But, how do you activate software to
credit their leave balances on a
day-to-day basis?

Just stopping by ...
Wayne
 
how do u increment by a timer?
this is really got me this one. im stumped :(
 
But, but, but...

You don't need to hold the leave entitlement, because you can caculate it any time you need it. It's only the leave taken that you need to store. Subtract this from the leave entitlement to give you the current balance available.
 
Don't know if this might help, it's a function that works out the Internal Rate of Return by using an initial value and compounding interest over a specified time at a speciifed rate.

Code:
Function InternalRateOfReturn(ByRef sngPrincipal As Single, ByRef sngInterest As Single, _
    ByRef sngTotalYears As Single, ByRef sngTimesCompounded As Single)
   
    Dim q As Single ' work out brackets
    
    sngTotalYears = sngTotalYears * sngTimesCompounded
    
    q = 1 + ((sngInterest / 100) / sngTimesCompounded)
    
    Dim A As Single
    
    A = q ^ sngTotalYears
    
   InternalRateOfReturn = sngPrincipal * A

End Function

So, to call it you might use something like this:

dblAnswer = InternalRateOfReturn(InitialMoney, 0.0547945, 1, 365)

Not sure if it could help, just thought it might give you some ideas.
 

Users who are viewing this thread

Back
Top Bottom