Results 1 to 3 of 3
  1. #1
    Rickstar321 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    1

    Smile Calculating Average Time in the footer

    Hello! Novice here learning every day!

    I know this should be simple but it is eluding me.

    The query for my report (with a date parameter) is calculating time elapsed for each record, I am simply tryin to add an "Average Time" calculation in the footer. I am getting #Error.

    I am working on the report but here is the SQL for the Query it is pulled from In case I have it wrong.



    Code:
     SELECT TruckLog_tbl.Log_Date, TruckLog_tbl.Log_Time, TruckLog_tbl.Log_TruckLoaded_time, Format([Log_Time]-1-[Log_TruckLoaded_time],"Short Time") AS loadouttime
    FROM TruckLog_tbl
    WHERE (((TruckLog_tbl.Log_Date)=[What Date?]))
    ORDER BY TruckLog_tbl.Log_Date, TruckLog_tbl.Log_Time;
    I have not set grouping because my data will be looked at by day.

    Thanks!!!

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    I am simply tryin to add an "Average Time" calculation in the footer.
    Footer of what, query? Forget that and do grouping, sorting and group calculations in the report.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    in the query, there should be an elapsed time field,
    in the report detail, show the E time,
    in the report footer, add a E time field here to, then alter it's Control Source to : =AVG([time])

    elapsed time is : DateDiff("n",startdate , endDate)

    flag:
    n = minutes
    H = hours

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculating an average from checkboxes?
    By Twitchie in forum Reports
    Replies: 2
    Last Post: 03-06-2014, 01:02 PM
  2. Replies: 5
    Last Post: 01-04-2014, 02:29 PM
  3. Replies: 4
    Last Post: 03-01-2012, 01:02 PM
  4. any idea on calculating average?
    By sk88 in forum Access
    Replies: 3
    Last Post: 08-30-2011, 11:32 PM
  5. Calculating average in table
    By prv in forum Database Design
    Replies: 1
    Last Post: 12-14-2010, 01:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums