Listing "Top Values" first - Help Please

A

Adam

How can i get a report to display the customer with the most points within
his group to show up on top of the group list? (see below)

I have a report that is bound to a query. In that query i calculate how many
points each customer per day. In the query i also calculate the total for
that day. In the report i do a SUM([field that has the days total]) to add up
all the points for all the days totals the customer has. I do this in the
customer ID footer. I group the report by customer type then by customer
code. How can i get the report to display the customer with the most points
within his group to show up on top of the group list?
 
D

Duane Hookom

You may need to create another query similar to your report's record source
but grouped by Customer. Add this totals query to your report's record source
query and join the Customer field. Add the appropriate total to the query to
use in the report's sorting and grouping.
 
A

Adam

understood the first part, but lost me on the second...can you elaborate a
little more? I copied the query reran it and grouped by customer - but i dont
understand what you are saying i should do next...?

Duane Hookom said:
You may need to create another query similar to your report's record source
but grouped by Customer. Add this totals query to your report's record source
query and join the Customer field. Add the appropriate total to the query to
use in the report's sorting and grouping.
--
Duane Hookom
Microsoft Access MVP


Adam said:
How can i get a report to display the customer with the most points within
his group to show up on top of the group list? (see below)

I have a report that is bound to a query. In that query i calculate how many
points each customer per day. In the query i also calculate the total for
that day. In the report i do a SUM([field that has the days total]) to add up
all the points for all the days totals the customer has. I do this in the
customer ID footer. I group the report by customer type then by customer
code. How can i get the report to display the customer with the most points
within his group to show up on top of the group list?
 
D

Duane Hookom

Your totals/group by query should sum the points or whatever value you want
to use to sort your report. Once the totals query is added to your report's
record source query, you can use the SumOfPoints in your report's sorting and
grouping dialog.
--
Duane Hookom
Microsoft Access MVP


Adam said:
understood the first part, but lost me on the second...can you elaborate a
little more? I copied the query reran it and grouped by customer - but i dont
understand what you are saying i should do next...?

Duane Hookom said:
You may need to create another query similar to your report's record source
but grouped by Customer. Add this totals query to your report's record source
query and join the Customer field. Add the appropriate total to the query to
use in the report's sorting and grouping.
--
Duane Hookom
Microsoft Access MVP


Adam said:
How can i get a report to display the customer with the most points within
his group to show up on top of the group list? (see below)

I have a report that is bound to a query. In that query i calculate how many
points each customer per day. In the query i also calculate the total for
that day. In the report i do a SUM([field that has the days total]) to add up
all the points for all the days totals the customer has. I do this in the
customer ID footer. I group the report by customer type then by customer
code. How can i get the report to display the customer with the most points
within his group to show up on top of the group list?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top