Help I'm totally baffled by this formula.
I am working on a holiday database for our staff and need to stop employees
booking holidays if they dont have enough hours.
I have a main form which holds their entitlement, totals from 3 sub forms
(holidays booked, holiday adjustments and bank holidays worked) in order to
calculate their remaining hours.
I want to put a control onto the sub form where they book their holidays to
stop entitlements going below 0.
I have based my sub form on a query that will pick up the total holidays
booked and the original entitlement, but need a way to pick up total holiday
adjustments and total bank holidays worked. I have a feeling that the dsum
function would work, but dont understand the structure of how i put this
together. I have had several attemps and seem to be tying myself in knots.
Would be really grateful if someone out there could help.
NetworkTrade - 06 Mar 2008 14:52 GMT
not sure I fully understand; but if your form/subforms has all the numbers to
do the math; then I think you can do the math in vba in the 'AfterUpdate'
event of their booking field
If MathTotal <=0 Then
maybe create a messagebox telling them they've exceeded
and maybe change that booking value back to 0
End If
so it didn't jump out at me that one needs the dsum function but maybe I
don't fully understand....

Signature
NTC
> Help I'm totally baffled by this formula.
>
[quoted text clipped - 14 lines]
>
> Would be really grateful if someone out there could help.