Sort on Subtotals in an Access Report

G

Grd

Hi,

I have a grouped report by City and a list of employees in each city. I've
got a subtotal in the City footer which counts the number of employees.

The report is currently sorted in ascending order by the City. I would like
it to be sorted by the subtotals in descending order instead. i.e the cities
with the biggest number of employees would be listed first.

Is this possible in Access. Is it easy or does it require VBA?

Thanks in Advance

Grd
 
D

Duane Hookom

Create a totals query that groups by City and Counts employees. Add this
totals query to your report's record source and join the City fields. You
can then use the CountOfEmployees from the totals query to sort your report.
 
G

Grd

Thanks Duane,

I use Crystal Reports which allows you to sort by subtotals much more
easily. Its got a button for this purpose. I'm a little disappointed that you
can't do it in access as easily but I appreciate your technique for sorting.

I wouldn't have ever figured it out on my own. Newsgroups are great!

thanks
Grd
 

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