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!

Combining two crosstab queries You must specify one or more row headings, one column heading

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
0
0
US
In Access 2003. I have two crosstab queries that are working. To create the report that I need to create I need to combine them. I keep on getting the error to create a crosstab query, you must specify one or more Row headings,one Column heading and one value option. Is there a way around this error? I need the units in column 1 and RVU in column 2

Tom


Code:
Query 1 for RVU
TRANSFORM Sum(dbo_tmp_rpt_dat_CPTRVU.workrvu) AS [Total Of workrvu]
SELECT [cptcode] & "-" & [cptcomp] AS CPT, dbo_tmp_rpt_dat_CPTRVU.cptdesc, dbo_tmp_rpt_dat_CPTRVU.unitrvu
FROM dbo_tmp_rpt_dat_CPTRVU
GROUP BY [cptcode] & "-" & [cptcomp], dbo_tmp_rpt_dat_CPTRVU.cptdesc, dbo_tmp_rpt_dat_CPTRVU.unitrvu
PIVOT dbo_tmp_rpt_dat_CPTRVU.rptpd;

Query 2 for units
TRANSFORM Sum(dbo_tmp_rpt_dat_CPTRVU.adjunits) AS [Total Of units]
SELECT [cptcode] & "-" & [cptcomp] AS CPT, dbo_tmp_rpt_dat_CPTRVU.cptdesc, dbo_tmp_rpt_dat_CPTRVU.unitrvu
FROM dbo_tmp_rpt_dat_CPTRVU
GROUP BY [cptcode] & "-" & [cptcomp], dbo_tmp_rpt_dat_CPTRVU.cptdesc, dbo_tmp_rpt_dat_CPTRVU.unitrvu
PIVOT dbo_tmp_rpt_dat_CPTRVU.rptpd;
 
Did you see this ?
faq701-4524

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top