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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting different queries on same query 1

Status
Not open for further replies.

deante

Technical User
May 26, 2005
34
US
I have ran some queries to compute averages. I need to be able to create a report using these queries but I cant put them on the same report because the data comes from one table.

I have different queries
Instructor Average query
Alfred 3.4
James 3.5
Brian 4.2
Steve 4.5

Training Average query
Alfred 4.0
James 3.5
Brian 3.8
Steve 4.4

Equipment Average query
Alfred 4.1
James 3.6
Brian 4.5
Steve 3.8


I want to have all of these different queries on one query or report so that I can print them out on one page.

kinda like this one

Instructor InstructorAverage TrainingAverage Equipment Avg
Alfred 3.4 4.0 4.1
James 3.5 3.5 3.6
Brian 4.2 3.8 4.5
Steve 4.5 4.4 3.8


Thanks in advance for your help
 
quick and dirty:

SELECT INSTRUCTOR, "Instructor Average", InstructorAverage from 1stquery
UNION
SELECT INSTRUCTOR, "Training Average", TraingAverage from 2stquery
UNION
SELECT INSTRUCTOR, "Equipment Average", EquipmentAverage from 3rdquery

save this (qryAllAverages) and use it as the source of a cross tab query.

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
 
Create a saved based on your 3 averages queries:
SELECT I.[name field], I.[Average field] AS InstructorAverage, T.[Average field] AS TrainingAverage, E.[Average field] AS [ Equipment Avg]
FROM ([Instructor Average query] AS I
INNER JOIN [Training Average query] AS T ON I.[name field] = T.[name field])
INNER JOIN [Equipment Average query] AS E ON I.[name field] = E.[name field];

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Neither seems to be working.

All I am trying to do is create a report or query where I can have all the information I got from the other queries on one page.

I've been trying to get it all day, sorry I'm new with Access.

Thanks in advance.
 
are you getting an error message? no results returned? What is the SQL for your original queries?


Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
 
The One You gave me was not working.

I have another SQL Im using that gives me the table I want but it asks for parameter values and if I dont enter any in leaves the table blank. this is the SQL im using

SELECT Practice3.[Instructor 1],Training_Average.TrainingAverage, Instructor_Average.InstructorAverage, EquipmentAverage.Equipment_Average, Overall_Average.OverallAverage, Total_Average.TotalAveragebyInstructor
FROM TrainingAverage,InstructorAverage,Equipment_Average, OverallAverage, TotalAveragebyInstructor, Practice3
GROUP BY Practice3.[Instructor 1];
 
let's back up a step. Is all this information in a single table or multiple tables? Can you describe the structure (field names), provide some sample data and what your expected results from the sample data would be?

That would be extremely helpful in helping you.

Thanks,
leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top