grouping with a total

J

jean.ulrich

Hi

I have a report based on a sumn query

The report show for an employee total hours woerked for each day

thursday june 1 10 hours
friday june 2 10 hours
satursday june 3 5 hours
sunday june 4 10 hours
and so on

As our working week start satursday and end on friday, I would like a
total under each friday like the example below (TOTAL is the total of
hours for the week)

thursday june 1
friday june 2
TOTAL FOR THE WEEK
satursday june 3
sunday june 4
monday june 5
tuesday june 6
wednesday june 7
thursday june 8
friday june 9
TOTAL FOR THE WEEK
and so on ....

thanks
 
A

Allen Browne

In query design view, type an expression like this in to the Field row:
WeekStarting: CVDate([WorkDate]-Weekday([WorkDate],7)+1)
Replace WorkDate with your field name.

You can now create a report, and use the Sorting And Grouping dialog (View
menu) to group by the WeekStarting field, with a Group Footer showing the
sum of hours.

If you just want to show the weekly totals in your query, depress the Total
button on the toolbar. Access adds a Total row to the query design grid.
Accept Group By in the Total row under the WeekStarting field, and choose
Sum under the field that contains the number of hours.
 

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