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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab query as the control source of a report used as a subreport

Status
Not open for further replies.

RomeERome

Programmer
Nov 17, 2003
45
0
0
US
Hello,

I am trying to use a report created using a crosstab query. The problem that I am having is that it will not let me use that report as a subreport in an existing report.

Access 97 gives me an error message that says that a pass-through or crosstab query can not be used as a control source for a subreport.

Is there a way to to force the report created by a the crosstab query to allow the subreport to exist? [sadeyes]
 
As far as I know, crosstab queries with dynamic column headings cannot be used for subreports.
If you set the Columnheadings property for the crosstab query and use those headings in the subreport, you should be fine.

HTH


[pipe]
Daniel Vlas
Systems Consultant

 
Dan
I have found the same thing. Setting coumn headings allows use of crosstab as subquery.

I have been able to do this manually. However, is it posible to set / change the column headings through VBA? It appears you can, per Column Propterties Help:
"You can set this property by using the query's property sheet. You can also set it ....... in Visual Basic by using a PIVOT clause in the SQL statement."

Do I need to set the entire record source w/ SQL or is it possible to just change the column headings with PIVOT clause? If so, what is the syntax? Thanks in advance.

JDTTEK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top