Connecting Tech Pros Worldwide Forums | Help | Site Map

Combining Two Queries

Member
 
Join Date: Nov 2006
Posts: 118
#1: Jul 11 '07
Does anyone know if it is possible to combine two queries that have the same fields? I basically want to combine a number of fields with the totals for those fields into one query (see example below).

eg. If the original query contained four items: a, b, c and d, the resulting query or table combination would be:

Name Amount
a 1
b 2
c 3
d 4
ALL 10

Where All is the sum of the original values.

The only method I can think of for doing this at the moment involves the original query (a,b,c,d), creating a query for the totals (ALL), and then inserting the data from the two queries into a third object, a table. While this will work, it seems a bit clumsy.

Does anyone have any ideas?

Stang02GT's Avatar
Moderator
 
Join Date: Jun 2007
Location: USA
Posts: 1,152
#2: Jul 11 '07

re: Combining Two Queries


you could do a Union query
Member
 
Join Date: Nov 2006
Posts: 118
#3: Jul 11 '07

re: Combining Two Queries


Great, thanks for your help.
Reply


Similar Microsoft Access / VBA bytes