Re: Crosstab query column headings
- From: "Duane Hookom" <duanehookom@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 12:29:25 -0500
Assuming you want a three month period that ends on the date value in the
control Forms!frmDates!txtEndDate:
Use a column heading expression of:
ColHead: "Mth" & DateDiff("m", [DateField],Forms!frmDates!txtEndDate)
Set the Column Headings property to Mth0, Mth1,Mth2 for three months up to
and including the date on the form.
You may also need to set the data type of your query pararmeter. Select
Query->Parameters and enter
Forms!frmDates!txtEndDate Date/Time
--
Duane Hookom
MS Access MVP
"Matt Clepper" <MattClepper@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:730FDC1A-C224-49BB-AD68-3810A805DA27@xxxxxxxxxxxxxxxx
> Is there any way to specify the column heading names in a crosstab query.
> Here's my issue. I'm building a report that bases off a crosstab query.
> Of
> course the crosstab query headers are named the pivot values. However,
> the
> query is looking at trends and the column headers will change. For
> example,
> I have a query give me a trend over the past 3 months, pivoted on the
> month -
> so I get column headings Feb, Mar, April. If I run the same query next
> month, I'll get colum headings Mar, April, May. I'd like to just name
> them
> Month1, Month2, Month3. The access report that is based on the query has
> to
> have the control source specified, but it's a column header that is
> constantly changing. Any help? I believe my only two options are to
> figure
> out how to make the query heading static (Month1, etc) or make the control
> source in my report look for a specific column number (query.column(2) -
> ??this doesn't seem to work) and not a column name 'Jan'.
>
> Thanks!
.
- References:
- Crosstab query column headings
- From: Matt Clepper
- Crosstab query column headings
- Prev by Date: Re: Converting a non-standard table
- Next by Date: How can I run my queries that Windows XP thinks are malicious?
- Previous by thread: Crosstab query column headings
- Next by thread: Doing Queries in Access is Aggravating
- Index(es):
Relevant Pages
|
|