Link to home
Start Free TrialLog in
Avatar of mtrout
mtroutFlag for United States of America

asked on

Want to total all grouped hours into total sum of hours in an access report

Hello,

I need assistance again please.  

I received assistance with obtaining total hours based on another field being grouped.  I have tried to sum up all of the total hours listed, but am not able to successfully sum up all of the total hours collected.

This worked in the query and shows well in the report:

TotalHours: FormatHourMinute(Sum([YourDateField]))

I have tried to use the sum formula and making sure the the format of the field in the report footer would have the format of short time but using sum and the field give me either the first value in the list, or #Error in the field, or Data type mismatch in criteria expression.

The latest tried was:

=Sum([TotalHours])

The other fields used were easy to total in the Report footer.  The total hours field just allows for Count Records and Count Values.

Thank you so much.
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

If you have a field name in report's record source, f1
In Field group add text field with control source = SUM(f1)

For grand total, use the same t field name in report's record source, f1
In report footer add a text box with record source = SUM(f1)

In your code:
 Total in report footer:
=Sum([TotalHours])      ====>  Sum([YourDateField])
Avatar of mtrout

ASKER

Hello,
That's what I put in the Report footer

=Sum([TotalHours])

and I get the error
 
'Data type mismatch in criteria expresson'

Maybe I have it in the wrong place or something?

Unfortunately, I will not be able to respond until the 25th.  I hope it's ok to resume this later.  I have enclosed what I am doing.

I did not want to 'look bad' by not responding; and without a reason why.  Will converse again soon.  Thank you so much.
Meeting-File.accdb
Screen-Shots-for-Grand-Totals.doc
ASKER CERTIFIED SOLUTION
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mtrout

ASKER

When the query was modified by Hnasr to include the correct total hours of the sum and the format was added to the report, this worked.  Thank you Hnasr!
Welcome!