Crosstabs & Changing the Date Expression

  • Thread starter Cathy via AccessMonster.com
  • Start date
C

Cathy via AccessMonster.com

I've created a have created a crosstab query using the crosstab query
wizard. For rows I have the names of employees and for the columns I have
dates they worked. Hours are shown for each employee under each date. I
want to change those dates to week ending dates and combine hours for all
dates in one week. Access 2003 only lets you separate dates by year,
month, and date when you use the crosstab Wizard. How could I change the
date to the week ending date?
 
D

Duane Hookom

Let the wizard create whatever it wants and then modify the Row Source
property which is a query. You can then set the column heading to
ColHead:DateAdd("d",-Weekday([WorkDate]),[WorkDate]+7)

I prefer to use the DateDiff("ww",[WorkDate], OtherDateExpression) function
to create relative column headings.
 

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