----- Duane Hookom wrote: -----
Are the dates used as column headings? If so, consider this answer I just on
another crosstab question that grouped by weeks rather than days. You can
easily modify the solution for days.
===========================
This is where I would use "relative weeks" rather than "absolute weeks".
Relative weeks would compare your date field to a date entered on a form to
create the columns. For instance, you could use an expression like:
ColHead:"Wk" & Datediff("ww",[DivDate],[Forms]![frmA]![txtEndDate])
This would create column headings like
"Wk0", "Wk1", "Wk2", "Wk3",...
Wk0 would contain the values for DivDate in the same week as txtEndDate. Wk6
would be 6 weeks earlier. You would need to set the Query|Parameters
[Forms]![frmA]![txtEndDate] Date/Time
and set the Column Headings property to
"Wk0", "Wk1", "Wk2", "Wk3",... (depends on how many weeks)
This method allows you to create a report that will ALWAYS have the same
column/fields. It requires no code and no future maintenance of the query or
report.
===========================
--
Duane Hookom
MS Access MVP
Nik said:
I am creating a crosstab query to display a count of how many jobs
each
staff member has outstanding against a given date. The crosstab works fine,
but doesn't show me the dates where nobody has any outstanding jobs. there any
way I can do this? build up
a table of dates each time the query is displayed.