>Thank you for your reply, but the problem is that I have to keep deducting
>from the previous balance. ex: if james accumulated 25 days for the year and
>yesterday tood a day off, his new balance should be 24, but then a month from
>now, he takes again another vacation day, so now his balance should be 23. I
>hope this help. I know that this formula requires some IIF clause, but I'm
>not sure how to do it.
One solution is to not store the new balance at all, anywhere!
You have the initial time-off allotment.
You can use a Query to calculate the sum of the time taken off.
Subtract the latter from the former; that's the new balance.
There is no need, and no benefit, to storing it.
John W. Vinson [MVP]
naja - 29 Jan 2008 13:58 GMT
Thank you for the reply, the only problem is that i need a run down of how
those days were taken on each line of a report so that when I presented is
clear to the manager.
here is how excel formula looks like:
=IF(AND(ISBLANK(D3),ISBLANK(E3)),"",F2-D3+E3)
=IF(AND(ISBLANK(D4),ISBLANK(E4)),"",F3-D4+E4) and so forth.
I'm not sure on how to do this on Access.
> >Thank you for your reply, but the problem is that I have to keep deducting
> >from the previous balance. ex: if james accumulated 25 days for the year and
[quoted text clipped - 12 lines]
>
> John W. Vinson [MVP]
rox - 29 Jan 2008 14:47 GMT
Conceptually Access isn't the same animal as Excel, so be careful not to
rely on the kind of thinking that goes into designing Excel formulas.
You could have a simple table with Total Vacation Time in one field and
Total Time Taken in another...and as the months go by you can just have
whoever is logging the time taken off increase the number that's stored in
"Total Time Taken". So in March the total time taken off would be 1 day, in
April you'd just type over the 1 and make it a 2.
There are more elegant ways to do this, like having a separate table log all
days off by employee and linking that with a query to the table of all
employees and their total accrued vacation--which would allow for more
interesting reporting. That is the way I would do it, if it were my project.
> Thank you for the reply, the only problem is that i need a run down of how
> those days were taken on each line of a report so that when I presented is
[quoted text clipped - 28 lines]
>>
>> John W. Vinson [MVP]
naja - 29 Jan 2008 15:05 GMT
Thank you rox, it does make a lot of sense what you said, i will try to apply
your idea. once again thanks.
> Conceptually Access isn't the same animal as Excel, so be careful not to
> rely on the kind of thinking that goes into designing Excel formulas.
[quoted text clipped - 42 lines]
> >>
> >> John W. Vinson [MVP]