Crosstabs & Changing the Date Expression

  • Thread starter Thread starter Cathy via AccessMonster.com
  • Start date 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?
 
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.
 
Back
Top