How create report col heads from crosstab query

  • Thread starter Thread starter Rebecca
  • Start date Start date
R

Rebecca

I have a report based on a crosstab query. It will return
a varying number of week columns (from 1 to 8) depending
on a from/to date parameter.
How do I handle this in my report? How do I get the column
headings (which will be a weekending date) into the report.
And how do I get the values into the report for those
columns, bearing in mind that the columns may or may not
exist in my query.

I'm fairly new to Access and am using version 2000.
 
That site seems to be down temporarily. If it doesn't come back up tomorrow,
I will post the file to a different site (I wrote the demo but work
elsewhere now).

I create date interval crosstabs to always have the same number of columns.
This might mean creating a 4 column report and an 8 column report. I use
relative date headings. For instance assuming an ending date of
frmA!txtEndDate and a date field of SaleDate, the column heading expression
would be:
ColHead: "Wk" & DateDiff("ww",Forms!frmA!txtEndDate, [SaleDate])
Set the query parameters
Forms!frmA!txtEndDate Date/Time
and set the column headings property to
Wk0,Wk1,...Wk7
The Wk0 column will have the values from the week of txtEndDate.
 
Back
Top