Subtotal hours worked by group

E

Edmund Wong

I can't get the group time to subtotal. This is what I show in my
report:

Group Date Start End Subtotal
A 2/15/05 10:00 AM 6:00 PM 8:00
A /16/05 9:00 PM 6:00 AM 9:00

I can't get the Report to total to 17:00.
My calculation for the subtotal is "Format([Start]-1-[End], "Short
Time")

I created a Group footer [Group] and created a text box with
"=sum([subtotal])", but I get a "data mismatch" error.

Thanks
 
D

Duane Hookom

You can't total controls and you shouldn't attempt to total text values. If
you have a control source in the detail section that works, then use the
same expression in your Sum()
=Sum([Start]-1-[End])
=Sum(IIf(Start>End, Start-End, End-Start))

Formatting should be applied using the Format property. This is generally
preferred over formatting in the control source. There are exceptions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top