Crosstab query

  • Thread starter Thread starter Frederik Vanderhaeghe
  • Start date Start date
F

Frederik Vanderhaeghe

Hi,

I would like to make a crosstab query in which the colum headers are the
months out of the datefield. How can I get the monthsname (Jan., Feb.,...)
out of the datefield and into the colum header??

Fré
 
Instead of DateField use
Format(DateField, "MMM")

If you want the column to appear in order Jan to Dec instead of
alphabetically, then you also need to enter the month abbreviations in the
column heading property.

In SQL you would change the last line of your Crosstab query to read
something like

Pivot Format(DateField, "MMM") IN ("Jan","Feb",...,"Dec")
 
Set your column heading expression to something like:
Colhead: Format([DateField],"mmm")
Then set the Column Headings property of the crosstab to:
Column Headings: "Jan", "Feb","Mar",...."Dec"
 

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

Back
Top