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

Can't do ANYTHING with Crosstab Queries!!!

Status
Not open for further replies.

mavalon

Programmer
Apr 18, 2003
125
US
I have a crosstab query. I use a crosstab query because I need the ROWS of one table to act as "COLUMNS" for th x-tab query. The "columns" of the X-tab query are based on a parameter passed to the Crosstab Query. Running the query from design mode works perfectly. I NEED THOSE RESULTS IN EITHER A SUBFORM OR SUBREPORT to print. In fact, a printable report is the main purpose of this database. When I try to add this query thru the wizard no fields appear to select, so I cannot complete the wizard.

The ideal solution would be to embed an Excel spreadsheet and populate the spreadsheet with records from the crosstab-query. Well, I started threads on this (thread707-530523 and no one could figure out how to populate an embedded excel spreadsheet with data from VBA code. (This is odd because you'd think that there would be a purpose to the Access functionality of embedding excel worksheets aside from just looking at already existing excel worksheets. There should definitely be a way to populate it with data. But, I'm thinking it's utterly impossible.)

Since that didn't work, I'd at least like to be able to present the results of my x-tab query in a grid on a subform or subreport. Is there a way to at least do THIS???
 
A (partial) soloution is to base the report on a select query using the hte XTab as it's source. You still need to be able to provide recurring field names, but at least the report can then be laid out. To provide hte recurring field names generally requires some detailed knowledge of the process. one approach is to use a SIMPLE table which lists the desired field(s) along with some meaningful value for use in an OUTTER join to the XTab, and use the 'meaningful' fields as the column headers of the crosstab. In this manner, the actual fields can generally be variable, while the select query fields are fxed.

Another approach (with less flexibility) is to set up the column headers property of the crosstab query itself.



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Thanks for your suggestions. I finally got my x-tab query to work with a subform. I made the mistake of adding "Query Parameters..." to the subqueries of my x-tab query, which was causing the fields not to appear in the wizard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top