Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a report from multiple queries?

Status
Not open for further replies.

Gustavson

Technical User
Nov 2, 2001
105
US
I'm using access97. I have a report which is printed from a single query. Is there a way to get information from other queries as well? I tried to create a report from two different queries and I get a message that says something about wizard cannot connect fields from the two queries.. Any suggestions?

Hope this is enough info..
Thanx
Gustavson
 
Create a new query which must include all the other queries by joining them by key field(s) which must appear in all queries. Check your links between queries. The best results is to select a query which will be your source of information. The other queries will only "add value" to the first query. Point the report to the new query.
 
You can use multiple queries in a query provided you can join them.

If you want something like all the records from one query and all the records from another, you can make the first query into a make table query using a temp name, and make the second an append query into the same table. Then query the table for the report.

Or is that not what you meant at all? Peter Meachem
peter@accuflight.com
 
okay, i guess i'm trying to use this like an excel spreadsheet.. On my report I have a list of quantities sorted by catagory. I need to get a total of the list below the list. I can't seem to get the total of each catagory in the same query without messing up the sorting of data.. Here's an example of what I would like it to look:
buliding 1 compressed gas nitrogen 100ft^3
building 1 compressed gas helium 45 ft^3
building 1 compressed gas argon 5 ft^3
total 150ft^3
building 1 corrosive solid magnesium 25 lbs
building 1 corrosive solid sodium 45 lbs
total 70 lbs

See now if I use the Sum function here in the query I will not get the total of the three gases becuase their names are different.. I can get this by creating another query and just using the fields:
builing 1 compressed gas quantity(Sum this Quantity) I get total..

If I could just implement a control box into the report and use it to add up the quantities under each catagory(compressed gas), I wouldn't have to deal with any query.. This is the only easy solution I can think of but don't know how to do this inside the report design.

The other possiblilty was to create a field in the query and tell it to add up the quantities of each catagory..

so in the query it would look like this:

building 1 compressed gas nitrogen 100 ft^3 150ft^3
building 1 compressed gas nitrogen 45 ft^3 150ft^3
building 1 compressed gas nitrogen 5 ft^3 150ft^3

Hope this makes sense
Thanx
Gustavson
 
If you group by category, which is what you want, you can sum the values for each group. Use the wizard to build the report and it will talk you through the process quite well. I always (nearly) use the wizard and then mod the results afterwards. Peter Meachem
peter@accuflight.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top