URGENT HELP PLEASE - Deadline 2pm

Fozi

Registered User.
Local time
Today, 17:17
Joined
Feb 28, 2006
Messages
137
Guys

Working on a timesheet system where users enter their weekly times based on a 36 hour week. I have a backend query which takes these times and totals each users overtime/deficit.

On the form where times are entered I have a control which pulls through the total time accrued for each users onscreen from this query.

My problem is that this total should be limited to 14hr 24mins and any deficit from following weeks deducted from that total.

Eg. Joe Bloggs

  • Wk 1 works an excess of 8 hours
  • Wk 2 works an excess of 9 hours - totalling 17 hrs thus deducted to 14.24 max
  • Wk 3 has a deficit of 7 hours - total should be 14.24-7 not 17-7

Been working on this for days but to no avail. All help greatly appreciated. Sample database attached for reference.

Thanks
Fozi:(
 

Attachments

Bump!

Managed to get an extension. Grateful for any assistance folks. I've looked at it so long it has become meaningless!!!

Thanks
Fozi
 
Bump!

Sorry to be a pest. I appreciate that this may be something that takes more time than may be available so even if anyone can point me in the general direction of what to try etc...

For example, would it be possible to have a query that gave totals but where a parameter for the maximum value a field can add up to?

Thanks again
Fozi
 
Bump!

Anyone? Would be grateful just for a steer in the right direction.

Thanks
Fozi
 
Guys

Working on a timesheet system where users enter their weekly times based on a 36 hour week. I have a backend query which takes these times and totals each users overtime/deficit.

On the form where times are entered I have a control which pulls through the total time accrued for each users onscreen from this query.

My problem is that this total should be limited to 14hr 24mins and any deficit from following weeks deducted from that total.

Eg. Joe Bloggs

  • Wk 1 works an excess of 8 hours
  • Wk 2 works an excess of 9 hours - totalling 17 hrs thus deducted to 14.24 max
  • Wk 3 has a deficit of 7 hours - total should be 14.24-7 not 17-7

Been working on this for days but to no avail. All help greatly appreciated. Sample database attached for reference.

Thanks
Fozi:(

i downloaded your mdb. what forms, what queries, which tables are involved in your issues. what has been happening instead of what you want, and do you mean that an employee cannot accrue more than 14.24 hours maximum?
 
sorry I should have been more specific.

The form in question is entitled FRM_Activity and Flexi Entries by Week which has a few subforms contained
The main query is QRY_FlexiTotHrs which pulls through a total from the other queries per user.
Although employees may accrue more than 14hours and 24minutes (derived from the FlexiTotHrs, the excess is written off. Therefore any total exceeding 14hours and 24 minutes is lost.

I hope this clears it up. Thanks for taking the time to consider.

Fozi
 
For starters, you've named modules the same as the procedured contained within. That's a big no-no and has the potential of causing undetermined problems. Suggest renaming modules: GetTotalTime and UserName(GetUser). You could pull the procedures from both into a new module and name it Module2, then delete the original modules.

This may not make an immediate difference but, nonetheless, you need to get rid of known potential problems.

Bob
 
i'm sorry, i can't help you. your design is too complex for me. i understand your problem, but not sure how to advise. good luck with your project.
 
something i CAN advise to make things easier to trouble shoot (again, it's not going to help with your described problem) is to name your controls intelligently. i.e., not "Text51" or "Text49" but something more like "txtTotalMin" or "txtTotalHrs", which will make things make more sense in the long run and regarding code too.

btw, your code refers to a Text85 (on your FRM_Flexi Log subform), which doesn't exist, so wasn't sure what to make of that. while we're at it - don't use spaces in your asset or control names.
 

Users who are viewing this thread

Back
Top Bottom