Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable headings in a crosstab query

Status
Not open for further replies.

kennetha

Programmer
Sep 10, 2003
105
MT
Hi all,

Is it possible to create a crosstab query were colomn headings vary, ie fields are picked up from a form.(since headings change from day to day). I also, would like to be able to use it in a report.

Thanks
Kenneth
 
An answer to your report question. You can easily show an crosstab query in a report. I put it first in a subform and included this one in my main report. Select simply your crosstab query and afterwards you can modify the lay-out if you want

 
Crosstab query headings generally come from a field. How/why would you want to use a form? Column headings are generally dynamic based on your data.

There are several solutions for using a crosstab as the record source for a report, some good and some bad.

Can you provide more information about what you are attempting to accomplish?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookhom,

The header information comes from a query of which vary on a day to day basis. It is imposible to use the crosstable if you don't modify else from the query itself. Since the program was created for a dummy user no access is given this way. Only forms are used!
thanks
Kenneth
 
It is possible to create a crosstab report where the column headings will vary day to day. There are some sample crosstab reports at The Crosstab.mdb might be the best solution for you.

Your column headings aren't date values are they?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Not really but unique numbers such as invoice no.
thanks anyway
 
The sample solution in the link I provided handles this type of situation quite well. You don't have to know the invoice numbers prior to running the report.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top