Changing data under the column heading in a crosstab query

G

Guest

How do I print the correct information under the right column heading if I
only need information for 3days. I have a crosstab query set up with a date
control where I enter a start and end date. This report is set up to run
weekly (5days). My column headings are fixed where my report prints
M,T,W,TH,F. If I need to run the report for 3days the information is under
the wrong colunmn headings. The crosstab print the information like this
for a five day report:

D0 D1 D2 D3 D4
12 13 16 17 10

If I only want three days worth of information if gives it to me like this:

D0 D1 D2 D3 D4
16 17 10

Is there a way to conrol what column to print on a report?

Thanks,


Robin
 
M

Michel Walsh

Hi,


Try to change your PIVOT to something like:



PIVOT "D" & ( DatePart("w", MyDateTimeField) - 2 ) IN( "D"0", "D1", "D2",
"D3", "D4")




Hoping it may help,
Vanderghast, Access MVP
 

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