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

Compiling Multiple Crosstab Queries into One Report

Status
Not open for further replies.

Milin

Technical User
Jan 5, 2000
33
US
I am wanting to create a form that tracks, in crosstab-type layout, counts of phone, magazine, and card responses to specific marketing Ads. I want each to be broken out by month, <br>
<br>
Verticle by Magazine, Horizontal by Month with the intersections being three totals, one for each media type<br>
<br>
and so forth on each new magazine<br>
<br>
Already created are three seperate crosstab queries (made by the wizard) that will track each response media. Each of these tables track total counts by three-letter month format across the top of the table. I have three seperate reports for each media that looks like the above, but I want to combine all three to show the above chart setup. I created a combined query of all the values in each of the three crosstab queries and tried to create a &quot;master form&quot; against that &quot;master query&quot;, but I keep getting the message &quot;The specific field 'Jan' could refer to more than one table listed in the FROM clause of your SQL statement&gt;&quot; I assume this is because each of the individual crosstab queries each contains the same name of three-character month names and SQL can't deal with it??? Is there a way around this? Or, is there a way to make a crosstab query which will Count the intersection of the rows on three different fiels, so I would have three totals in each intersection cell??<br>
<br>
Thanks Much!
 
In your report take a look at &quot;sorting and grouping&quot;<br>
click View, Sorting And Grouping<br>
you must of course use one query. But it will allow you to group out months and you can put each month staring on it's on page.<br>
<br>
Another approach is to put a sub Report on your main report<br>
in that case the main report has heading info and the sub report or reports (you can have upto 4 I think) link with the Child/Master links in Properties of the sub form.<br>
<br>
as for as the SQL error <br>
Add the table name in fron of it i.e. Table1.jan, Table2.jan<br>
Where table is of course your valid table name.<br>
Now if your are writing code like<br>
SQL = &quot;Select table1.jan, Table2.jan From Table1 Etc Etc<br>
And a field is NOT in both tables you will have to remove the Table name in front of it when you refer to it.<br>
i.e. X = rst.fileds(&quot;OtherField&quot;)<br>
Not <br>
X = rst.fileds(&quot;Tabel1.OtherField&quot;)<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top