Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009

    Question Unanswered: How can I create a Complex Scheduling Observation Script

    Hello. I have, what I think, to be a pretty complex problem and I'm pretty new with Access. Very new. I know that I've bitten off more than I can chew, but I'm still going for it. If you're up for a challenge, I think I have one for you. If you know how to solve this problem, that would be fantastic and I would appreciate it very much.

    I am trying to create a script that eventually leads to a conditionally formatted report. I am trying to devise a script that can calculate hours worked, under what kind of conditions, including the amount of time off had, and then show this in a conditional format report.

    So far, I have created the tables and forms for an individual to enter the information. Each day, an individual should work NO MORE than 12 hours of work, max. But if the person consecuitively works 7 days (of 12 hour duty days) with no day off, then the conditional format in the report will go from green to red (Red being bad, approaching work overload). But if you have taken a 24 hour rest period, then the calculation resets and so the conditional format resets to green. Do you know how I can create this kind of script or thing? Remember, I am very new to access.

    Now, let me challenge you a little further if you're up for it. I also want to add in another type of calculation and conditional formatting for a 30-day report. This is one that goes from green to red if you're approaching a 30 day mark without a 48 hour rest period, no matter how many non-consecutive 24 rest hour periods the individual has had. And of course, at any time the person takes a 48 hour rest period, then auto reset to zero and green.

    If you know how to solve this and explain it to a simpleton like me, you are incredible.

  2. #2
    Join Date
    May 2005
    Well, I don't have the time to write up an entire code to implement all your logic, but I can point you to this which explains how to format a row on a report (It shows how to alternate row color, but you can adapt this with your logic to color the row as desired). That would be the approach I would take at least. Give it a shot and let us know how you get along or if you need some more help. Cheers!
    Me.Geek = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts