![]() |
|
|
#1
|
|||
|
|||
|
I am having a problem as to how to approch this. I have 8 tables with different structures serving different purposes. Each table has a field named "Region". I need to track counts and sums for each table in a single report broken out by "Region". My current (tedious) workaround is creating a query for each region using the DCount and DSum function specifying the region there. Each query is a one line item which in theory I would like to have recorded in a single query.
What I'm working with... Query 1 Region: "SCAL" A Count: DCount(from tblA where "Region" equals "SCAL") B Count: DCount(from tblB where "Region" equals "SCAL")... A Sum: DSum(from tblA where "Region" equals "SCAL") B Sum: DSum(from tblB where "Region" equals "SCAL")... returns: Region***A Count***B Count***A Sum***B Sum SCAL****68*******191******32351***9451 Query 2 Region: "NCAL" A Count: DCount(from tblA where "Region" equals "NCAL") B Count: DCount(from tblB where "Region" equals "NCAL")... A Sum: DSum(from tblA where "Region" equals "NCAL") B Sum: DSum(from tblB where "Region" equals "NCAL")... returns: Region***A Count***B Count***A Sum***B Sum NCAL****77*******132******41258***7942 What i would like returned... Region***A Count***B Count***A Sum***B Sum SCAL****68*******191******32351***9451 NCAL****77*******132******41258***7942 Please help on how to approach this. Thank you in advance. |
|
#2
|
|||
|
|||
|
Look at doing a "Union" query to bring things together. This will let you merge things together from several queries into one.
You'll have to type it in using the SQL window of Query Designer. Look up "Union Query" in the Access Help. The Examples & Union Operation pages should help you get started. |
|
| Bookmarks |
| Tags |
| domain, functions, query, unrelated tables |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Table related to multiple tables by single ID | MrTumnus | Access | 1 | 11-17-2009 11:05 AM |
Show two tables in single table
|
access | Forms | 8 | 06-11-2009 09:57 AM |
| Help reqd with Count of Similar Vals | AnthonyT | Access | 1 | 05-18-2009 10:15 AM |
| using COUNT for multiple tables | kwalt | Queries | 0 | 02-17-2009 12:06 PM |
| Once query to lookup information in multiple tables | Yanagowa | Queries | 1 | 07-06-2007 06:27 AM |