Report showing (probably)up to a 28 Day average?

fat controller

Slightly round the bend..
Local time
Today, 00:25
Joined
Apr 14, 2011
Messages
758
I currently have a spreadsheet that does this, albeit not very slickly, so whilst I am making changes to the current database I was wondering if I could make some more.

What I am thinking of is to have a fairly simple table, as follows:

Date
Supervisor Name
Day type (Sat, Sun or Weekday)
Duty Number (combo box, looked up from a separate small table)
Time Start (auto-completed based on Duty Number)
Time End (auto-completed based on Duty Number)
Target A (which would be a number such as 1.20 or 0.90)
Target B (which would be a percentage such as 85.00%
Result A (same format as Target A)
Result B (same format as Target B)

Restriction (whole number, no decimal places)
Output 1 (percentage)
Output 2 (percentage)

Then have a report that shows each day's data for each day worked, with a set of text boxes at the bottom of the page in the footer area most likely, that show the average of all Target, Result, Output and Restriction fields for all the dates shown on the report.

It would be most likely to be ran for a 7 day period or a 28 day period, but if it could be made able to cope with any number between the dates specified at the time that the report was being pulled, that would be ideal.

Is this possible, and what would the code be to get a field to calculate the averages at the bottom (I presume that this code would have to be different to handle the decimals or the percentages?)?

Thanks :)
 
Just at a glance, SupervisorName, and StartTime should never be in the same table. Read up on "database normalization" for info on how to organize data in relational database tables.
Hope this helps,
 
Sorry, I forgot to add that Supervisor Name is not in the same table.

I am fairly confident with most of what I want to achieve, its just the text boxes that would show the averages over a specified period of time.

Am I right in thinking that the best bet is to place them in the report footer?

I could (and have) achieved my desired result in Excel - would the control source codes be all that different in Access? The calculated text boxes would not be stored in any field either, of course.
 

Users who are viewing this thread

Back
Top Bottom