How do I reduce crosstab query to a single totals row

Shinken

Registered User.
Local time
Today, 01:07
Joined
Oct 5, 2002
Messages
14
WHAT I HAVE:

I have several year-to-date crosstab queries that look like:

qryGrubType
GRUBTYPE...Jan...Feb...Mar...Apr......etc
Goobers.....1.....5.....9.....2...
Snooters....2.....3.....2.....3...
Gnots.......3.....8.....5.....9...

qryFoobType
FOOBTYPE...Jan...Feb...Mar...Apr......etc
Gunkers.....1.....5.....9.....2...
Ptooters....2.....0.....4.....3...
Froobs......0.....8.....5.....7...

I've developed a multiple UNION statement that combines these crosstab queries into a single query that looks like:

qryAllTypes
TYPE.......Jan...Feb...Mar...Apr......etc
Goobers.....1.....5.....9.....2...
Snooters....2.....3.....2.....3...
Gnots.......3.....8.....5.....9...
Gunkers.....1.....5.....9.....2...
Ptooters....2.....0.....4.....3...
Froobs......0.....8.....5.....7...

WHAT I WANT TO DO:

In addition to a query with detail rows, I also need to create a summary querie with single rows containing the totals from each of the above queries, which should look like:

qryTypeSum
TYPESUM.......Jan...Feb...Mar...Apr......etc
TotalGrubs.....6....16....16....14...
TotalFoobs.....3....13....18....12...

I'm assuming that this would probably be done by creating individual summary queries such as...

qryGrubSum
GRUBSUM.......Jan...Feb...Mar...Apr......etc
TotalGrubs.....6....16....16....14...

qryFoobSum
FOOBSUM.......Jan...Feb...Mar...Apr......etc
TotalFoobs.....3....13....18....12...

...and then doing a UNION to combine them to get the qryTypeSum shown above.

However, if there's a way to bypass the individual summary queries and go straight to the qryTypeSum, it would certainly be even better.

HOW DO I DO IT:

Unfortunately, I can't seem to create one-row queries containing only summary data, from the crosstab queries (qryGrubType, qryFoobType, et al), on which to make the qryTypeSum UNION query.

Any and all suggestions would be appreciated.

Thanks,

Shin
 

Users who are viewing this thread

Back
Top Bottom