Re: Sum a time on a Rpt

Tech-Archive recommends: Fix windows errors by optimizing your registry



HOW DO I CREATE A SEARCH FORM???? wrote:
>i am trying that formula to sum all of the durations together in a report
>but unfortunately it is not working out for me, can u tell me what im doing
>wrong.
>
>What i did is i created a text box at the bottom of the report and plugged
>the following formula: =sum([total hours worked])


If the durations are in hours that should work, unless
[total hours worked] is the name of a text box. The
aggregate functions (Count, Sum, etc) only operate on
**fields** in the record source table/query, they are
unaware of **controls** on a form/report.

If [total hours worked] is a value that's calculated in the
report, then we will need to know what the original fields
contain and what calculation was done.

If the calculation is a simple expression, then you can use
Sum on the expression. E.g.
Sum(DateDiff("h", starttime, endtime)

--
Marsh
MVP [MS Access]
.



Relevant Pages

  • Re: Sum of calculated fields
    ... Since this seems to be in a report, ... property instead of using Sum. ... total overtime add a text box named txtRunOvertime with the ... Note that your calculation of midnight is overly complex. ...
    (microsoft.public.access.formscoding)
  • Re: Summing unbound controls at several group levels, and grand to
    ... What I am trying to do is sum a value from multiple records, ... It would be nice to do this in one report. ... Once this calculation is performed, ...
    (microsoft.public.access.reports)
  • Re: Help with some form calculations
    ... because it works when all the controls have data but if of them does ... not have data then it wont display the sum. ... You can perform the calculation right on the report itself, ...
    (microsoft.public.access.forms)
  • Re: Using Calculated Fields in Report Footers
    ... So, Access really can't sum a field created in the report, huh? ... One alternative is to perform the calculation in the ... The other is to use a report text box's RunningSum property. ...
    (microsoft.public.access.reports)
  • Re: Report is making too many numbers
    ... My report is grouped by Vendor, then Project, ... source query before putting it in the report so every record shows). ... A Running Sum text box accumlates its total. ... I've got a problem with Sum Totals at the end of a report, ...
    (microsoft.public.access.reports)