Running Sum Cap

Fozi

Registered User.
Local time
Today, 17:15
Joined
Feb 28, 2006
Messages
137
Is it possible to cap a running sum? I have users entering their working times per week which calculates any surplus/deficit in time. Thing is they cannot accummulate more than 14 hours overtime.

So if any users running sum exceeds 14 hours is stays at 14 hours and if the next week they take time off this is deducted from 14hours not the actuall running sum total.

So, is it possible to place a cap on a running sum? Or how best should I approach this?

Thanks to all.
Fozi
 
where is the running sum? you have it on a form? how are you calculating it? in a query? how is it displayed? when/where do you want it capped? is it for users' display only? or for your own internal reports?
 
where is the running sum?
It's currently created within a query.

you have it on a form?
I have a control on a form in which I would like it to display the current level of overtime, not exceeding 14hrs.

how are you calculating it? in a query?
Yes. Calculated by totalling all the excess/deficit minutes worked per week and generating a running sum in the query

how is it displayed?
I reference it from the time entry form by using both a subform and unbound control.

when/where do you want it capped?
At all times this cannot exceed 14hrs. Users will interact on a weekly basis entering their times from the previous week. On entry to the form I would like the above control to show their current amount, amending once they have entered the previous weeks amount.

is it for users' display only? or for your own internal reports?
Both. For users display onscreen but also needs dropped into a report which users print off for signing upon data entry.


The only issues that's beating me is the capping of the running sum. In effect would be simply if there wasn't an upper limit.

Thanks for taking the time to read.

Fozi
 
I've seen your posts dealing with this problem before and have not replied, because you're asking people here to assist you in violating federal labor laws. Refusing to pay for time worked is illegal! If you have a 'fixed' overtime limit, you need to deal with that at the time, not when the emploee posts their hours!
 
I've seen your posts dealing with this problem before and have not replied, because you're asking people here to assist you in violating federal labor laws. Refusing to pay for time worked is illegal! If you have a 'fixed' overtime limit, you need to deal with that at the time, not when the emploee posts their hours!

Thanks for the reply missinglinq. In response.

  • I work in the UK, we are not governed by Federal Labour Laws
  • This is not an overtime issue in the purest sense. I may have referred to it as such in posts but this was to ease understanding, which I have obviously failed at in this case.
  • This is to do with a flexible working environment where staff may (at their own behest) work extra hours than their weekly minimum requires. Against which they take time off, not payment.
  • It's a perk not a punishment however requires certain controls, one of which is the limit of accummulating up to 14 hrs.

Hope that clears it up. Would be grateful if you could assist where possible.


Fozi
 
Could you do a logical test on the result of the sum? For example something like;
Code:
= iif ([SumHours]<=14, [SumHours], 14)
 
Could you do a logical test on the result of the sum? For example something like;
Code:
= iif ([SumHours]<=14, [SumHours], 14)

Afraid not John.

Needs to check the total on a week by week basis, capping it at 14 as and when it exceeds that limit.

Thanks
Fozi
 

Users who are viewing this thread

Back
Top Bottom