use query or calculated control?

  • Thread starter Thread starter Cheryl
  • Start date Start date
C

Cheryl

I'm not sure what direction to take to set this up
properly.



Meals are allowed per shift in the following manner:

TimeWorked <=24 hours = 1 meal for every 8 hours.
Time Worked >=24 hours = 1 meal for every 4 hours, or a
portion thereof.

The answer I want to see here is "Total number of meals
per shift". Sometimes a shift could include hours and
minutes, so I need to be able to round up or down,
accoring to the portion of an hour worked, below the 24
hour period and beyond 24 hour period.

I'm not sure if I should create a query to achieve this,
or have a calculated control in a form, or something else
entirely?

Either way, at year end, I want to be able to print a
report that will show the total number of meals per year.

Thanks
Cheryl
 
On the report, you can create a calculated field to show the number of
meals. The big question is, "Do you need to store the value?"

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Steve

I have to be able to tally the total number of meals
allowed/year. I also want to be able to look back and see
that on a specific shift throughout the year "X" number of
meals were allowed. (If that is what you mean by storing
the value, then the answer is "yes".)

If you're meaning something else entirely, please explain
a little more so I can give you a better indication of
what I'm after.

Thanks
Cheryl
 
Because it needs to be utilized for other purposes, besides a one viewing on
the report, then you will want to store the data in a table. When that
should occur is something that you will need to decide, based on what all of
the needs of that data is. You have come up with two examples of where it
is used, perhaps it would be a good idea to perform a needs analysis and jot
down every expected use of this piece of data, or others like it. This will
give you a roadmap to start, and can be modified as development progresses.
 
Thanks. I'll check all that out.

Cheryl
-----Original Message-----
Because it needs to be utilized for other purposes, besides a one viewing on
the report, then you will want to store the data in a table. When that
should occur is something that you will need to decide, based on what all of
the needs of that data is. You have come up with two examples of where it
is used, perhaps it would be a good idea to perform a needs analysis and jot
down every expected use of this piece of data, or others like it. This will
give you a roadmap to start, and can be modified as development progresses.




.
 
Back
Top