N
NewSysAdmin
Hello. I am trying to display 2 rows of data underneath a column heading. I
have created two crosstab queries which work right independently. Below are
my 2 SQL statements for the 2 queries:
TRANSFORM Count([RMA/TR Tracking table].[Internal # no good sort]) AS
[Number of Occurrences]
SELECT DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]") AS CountOfRecord
FROM [RMA/TR Tracking table] INNER JOIN [Problem Codes] ON [RMA/TR Tracking
table].[Problem Code] = [Problem Codes].[Problem Code]
WHERE ((([RMA/TR Tracking table].[Internal # no good sort])>0))
GROUP BY DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]")
PIVOT [RMA/TR Tracking table].[Problem Code];
TRANSFORM Sum([RMA/TR Tracking table].[Internal # no good sort]) AS [Number
of Pcs]
SELECT DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]") AS CountOfRecord
FROM [RMA/TR Tracking table] INNER JOIN [Problem Codes] ON [RMA/TR Tracking
table].[Problem Code] = [Problem Codes].[Problem Code]
WHERE ((([RMA/TR Tracking table].[Internal # no good sort])>0))
GROUP BY DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]")
PIVOT [RMA/TR Tracking table].[Problem Code];
When I try to combine the 2 crosstab queries I get the results all displayed
in one row:
AA-01 AA-02 AA-03 AA-04 AA-01 AA-02 AA-03
AA-04
50 5 10 25 1 2
2 1
Here is a sample of the results I would like to see:
AA-01 AA-02 AA-03 AA-04 (This lists problem headings
across top)
50 5 10 25 (Number of pcs)
1 2 2 1 (Number of
occurrences)
Any help would be very much appreciated. Thank you.
have created two crosstab queries which work right independently. Below are
my 2 SQL statements for the 2 queries:
TRANSFORM Count([RMA/TR Tracking table].[Internal # no good sort]) AS
[Number of Occurrences]
SELECT DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]") AS CountOfRecord
FROM [RMA/TR Tracking table] INNER JOIN [Problem Codes] ON [RMA/TR Tracking
table].[Problem Code] = [Problem Codes].[Problem Code]
WHERE ((([RMA/TR Tracking table].[Internal # no good sort])>0))
GROUP BY DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]")
PIVOT [RMA/TR Tracking table].[Problem Code];
TRANSFORM Sum([RMA/TR Tracking table].[Internal # no good sort]) AS [Number
of Pcs]
SELECT DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]") AS CountOfRecord
FROM [RMA/TR Tracking table] INNER JOIN [Problem Codes] ON [RMA/TR Tracking
table].[Problem Code] = [Problem Codes].[Problem Code]
WHERE ((([RMA/TR Tracking table].[Internal # no good sort])>0))
GROUP BY DCount("[Internal # no good sort]","[RMA/TR Tracking
table]","[Problem Code]")
PIVOT [RMA/TR Tracking table].[Problem Code];
When I try to combine the 2 crosstab queries I get the results all displayed
in one row:
AA-01 AA-02 AA-03 AA-04 AA-01 AA-02 AA-03
AA-04
50 5 10 25 1 2
2 1
Here is a sample of the results I would like to see:
AA-01 AA-02 AA-03 AA-04 (This lists problem headings
across top)
50 5 10 25 (Number of pcs)
1 2 2 1 (Number of
occurrences)
Any help would be very much appreciated. Thank you.