Creating A Monthy Report Based On Several Querys

S

StuJol

I have two querys "Wages Query" & "Expenses Query" which displays the
following values

Wages Query Expenses Query

Month Amount Month
Amount
8 £12,000 8
£22,000
9 £20,000 9
£27,000

I want to create a Monthly Report where i can select the Month value from a
form and a report is generated showing the specified months data eg amount of
wages and amount of expenses. Can anyone help me please
 
S

StuJol

StuJol said:
I have two querys "Wages Query" & "Expenses Query" which displays the
following values

Wages Query Expenses Query

Month Amount Month Amount
8 £12,000 8 £22,000
9 £20,000 9 £27,000
 
D

Duane Hookom

Create a union query based on your two queries:
SELECT Month, "wages" as Category, Amount
FROM qWages
UNION ALL
SELECT Month, "Expenses", Amount
FROM qExpenses;

Make your report based on this union query.
 
S

StuJol

Thanks for info.

Im still not sure how to create a union query, please could you explain how
to build this in simple terms. Many Thanks. What part of the query do you
type union in?
 
D

Duane Hookom

You must enter sql similar to my earlier reply in the SQL view of the query.
If your query and fields names are different, then you must change them.

There is no "gui" design view of a union query.
 
S

Sam

Duane

I need to combine two queries so that I can generate one report from the two
queries.

The two queries are titled "qry_Policy_Override_HeadOffice_Pre" And
"qry_Policy_Override_Branch_Pre"

Both queries have the exact data in them (from two different sources),
however are named differently so as not to confuse the data base.

From this I want to generate one report combining the two queries data.

You have been mentioning union queries and I assume that this is the only
way to combine the data from two separate queries.... Is this the case?

How do I add the fields from each query into the Union Query???? Sorry about
the lame questions, however my knowledge of MS Access is very limited.

Regards
 
A

AliH

Something like
Query 1
SELECT txtName, txtAddress
FROM tblQuery1

Query 2
SELECT txtName1, txtAddress1
FROM tblQuery2

would become

SELECT txtName, txtAddress
FROM tblQuery1
UNION ALL
SELECT txtName1, txtAddress1
FROM tblQuery2

The result set would have column headings:
txtName and txtAddress

Hope this helps
 
Top