Adding column totals to crosstab queries in ACCESS 2003

G

grantschneider

I need to add column totals to the bottom of my crosstab. Here is the
code:


PARAMETERS [Month] Text ( 255 );
TRANSFORM Sum(MSF07.[Share Total]) AS [SumOfShare Total]
SELECT MSF07.Aircraft, MSF07_Crosstab1.[2007]
FROM MSF07 INNER JOIN MSF07_Crosstab1 ON MSF07.Aircraft =
MSF07_Crosstab1.Aircraft
WHERE (((Format([MSF07].[Date Closed],"mmm"))=[Month]))
GROUP BY MSF07.Aircraft, MSF07_Crosstab1.[2007]
PIVOT Format(MSF07.[Date Closed],"mmm");

Thanks

Grant
 
J

John Spencer

You can't do that in a query unless you use a UNION query.

And using a UNION query would require that you know in ADVANCE what columns
were being returned by the Crosstab query.

You might be able to do this in a report by adding the necessary controls
and calculations to a report footer.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top