[Weektype] is the hours submitted during a week indicating whether it is
one
week or the other. I am simply trying to fix an error in an access report
used for time clocks. I have been able to manipulate the program, however
can't get a better answer at the end of the report. I have taken the
query
that calculates the report and made it so whenever time is value in the
first
7 days it will bring out a field called "1". If the time is valued in the
following 7 days or second week, then it calcualtes out to "2". This
entry
is then presented on the report for each line item.
The report only calculates two weeks of time.
I am trying to total the time allocated for each day into a week. Due to
a
monthly split on the report I can't simply create a grouping option by
week.
I need totals of each week worth of time at the bottom of the report. I
have
been able to create a textbox that will total all the "1"s, howeverr when
it
reaches a different month or is on a split month it starts at a 0 value
(but
the maximum value is the correct result until it starts all over).
Therefore, if I can pick up the maximum value of [WeekType] (which is
simply
a query result that is in reference to the week it is tied to) I can value
the total week at the end of the report.
I know what you are thinking, why not use something as simple as
=Sum(IIf([WhichWeek]="1",[WeekType]))
However, I get an error when I try this. I want to get the maximum value
presented on the bottom of the document of the subtotals in each line
item,
since after a split month it starts all over. I believe that this will
solve
all these problems.
I understand you would recommend using a different name, which I would
agree
is reasonable. To not get more explanatory, how can I get the maximum
value
of this text box ([WeekType]) on the report footer???
Duane Hookom said:
What is the control source property of [Weektype]?
--
Duane Hookom
MS Access MVP
I have a text box that generates several line items on a report
At the bottom is a total, however I have a running sum text box for
each
line item linked to a certain value. This box is named [Weektype]
How do I create a function at the bottom of the report that has the
greatest
value of [Weektype]. Im using =Max([Weektype])
Example:
Bob 1.00
Bill 2.00
Fred .50
[WeekType]=2.00