query return only one row with averages

  • Thread starter Thread starter William McNeill
  • Start date Start date
W

William McNeill

I have a query with multiple columns of numbers and several hundred records.
I would like for the query to return one row, containing averages of each of
the columns. I have done a query that contains the averages at the bottom of
the column, but would like to get it to just the one row with the results.

I will eventually want to make a few one row queries like this and combine
them in another query or form. Thanks!!!
 
What did you try? Did you try select View->Totals in the query design and
then set all of the "Total:" properties to Avg?

Your description of "eventually...." sounds a bit unconventional. You might
want to ask some questions about what you are attempting to do and what your
current tables look like.
 
Hi Duane,
Thanks for your help, it is just what I needed to do. I did the
View->Totals in the query design and set the Total to Avg in each. When I
first tried this I was having trouble with the Fields where I set the
Criteria for the query, not being part of the aggregate function. I figured
out that I just needed to hide these Fields, and it executed the query
correct and gave me what I wanted. Thanks for your help in this.

What I was meaning earlier when I mentioned my goal of eventually combining
these queries into another query or form is: Now that you helped me solve
this hangup that I was having, I am going to make about 20 queries displaying
one row of Avgs just like the one I just created. Each query will have the
same Fields and be almost identical to each other, except there will be a
slightly different Criteria for each one to run its averages on. Once I have
created these queries, I will then hopefully be able to create another query,
or maybe a form, which will have about 20 rows, each row displaying the
results from one of the averaging query, so that I can see them all and once
and print them out. Thanks again for your help!!
 
If your 20 rows are based on the same table/query then you might be able to
use a single query. If not, you might get by with a union query, depending on
the number of fields in each of the 20 queries.
 
Back
Top