Minus data from subform

Mand

Mand
Local time
Today, 05:45
Joined
May 9, 2009
Messages
14
Hi,

I wonder if anyone could help - I have a personnel form, with a subform showing absence.

In my subform, I have a lookup box that displays the type of absence e.g. sl for sick leave, al for annual leave etc.

On my main form I have a field called holiday entitlement per annum, which is the number of hours they are allocated for annual leave each year (my firm splits it in to hours rather than days). What I would like to do is to minus their total holiday hours booked each year (April to April) on their subform from their holiday entitlement on the main form - but obviously only to do this when the lookup column has AL in it. There is no point minusing the sick leave days from the annual leave entitlement.

Is there any way to do this (bearing in mind I am a complete novice when it comes to confusing things such as code!)

I would be very grateful for the help!

Mand x
 
Hmmm...without using code? Not too likely, but if you bite the bullet and dig into code, this link will help.
 
You could create a query that filters out the necessary data and groups it by employee and summing the entitlement thus creating a balance. Then do a look up for a specific employee.

David
 

Users who are viewing this thread

Back
Top Bottom