crosstab query

H

Hong

Hello, I have a crosstab query, for rows I set up the date range parameter,
how can I limit the columns, for example, depends on the rows date range, the
column will shows the differnt date record, but I only need 13 records.
Can I limit the columns?

Thank you!
 
J

Jerry Whittle

Two choices.

First is to base the crosstab on another query and limit the returns in the
first query.

Second is to use the Column Headings property. Open the crosstab query in
design view; right click in the area near the tables; and select Properties.
Next go into the Column Headings and put in something like:

'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC'

The above should match the expected data. Advantages of Column Headings
include sorting across as you want as the months above would normally do APR,
AUG, etc. You can also make data not show up by taking out a column. For
example, remove JAN and January data won't show. And for your needs, it will
create an empty field for the form or report even if there is no matching
data.

Of course this only works if you always know what your column heading need
to be.
 
H

Hong

Thank you, Jerry:

I don't think the sceond choice works for me, but could you please explain
the first one.

Thanks again!
 

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