Sort on Sub Totals of a Group in MS Access Report

mrmmickle1

Well-known Member
Joined
May 11, 2012
Messages
2,461
I have data that I have put into a Report.

The Group and Sort Setup I have looks like this:

Group on Date Received > Newest to Oldest
Group On Data Entry Tech
Sort By Num Of ACCN > Largest To Smallest > This doesn't seem to work Num of ACCN is a Calculated Field which comes from two Number Fields

The Report Look Like This Now:


Excel 2012
ABCD
1May Daily Totals
2Date ReceivedWednesday, May 20,2015
3
4Data Entry TechnicianACCN Total
5Tiffany5
6Mike55
7John15
8TOTAL75
9Date ReceivedWednesday, May 19,2015
10
11Data Entry TechnicianACCN Total
12Tiffany5
13Mike100
14John15
15Andrew300
16Lanette25
17TOTAL445
Sheet1


I would like for it to look like this:


Excel 2012
ABCD
1May Daily Totals
2Date ReceivedWednesday, May 20,2015
3
4Data Entry TechnicianACCN Total
5Mike55
6John15
7Tiffany5
8TOTAL75
9Date ReceivedWednesday, May 19,2015
10
11Data Entry TechnicianACCN Total
12Andrew300
13Mike100
14Lanette25
15John15
16Tiffany5
17TOTAL445
Sheet1


Is there an easy way to accomplish this? It doesn't seem to work when I use the Sort. Any help would be appreciated.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I was able to accomplish this task in an SQL Statement:


Code:
[COLOR=#0000ff]SELECT[/COLOR] [DS-Work-Log-May 2015].Date_Received, [DS-Work-Log-May 2015].Data_Entry_Tech, Sum([DS-Work-Log-May 2015].Num_of_ACCN) [COLOR=#0000ff]AS [/COLOR]TOTAL
[COLOR=#0000ff]FROM[/COLOR] [DS-Work-Log-May 2015]
[COLOR=#0000ff]GROUP BY[/COLOR] [DS-Work-Log-May 2015].Date_Received, [DS-Work-Log-May 2015].Data_Entry_Tech
[COLOR=#0000ff]ORDER BY[/COLOR] [DS-Work-Log-May 2015].Date_Received[COLOR=#0000ff] DESC[/COLOR] , Sum([DS-Work-Log-May 2015].Num_of_ACCN) [COLOR=#0000ff]DESC[/COLOR];

However, I am still unable to sort in the report. I think I have to sort on an expression.... However, when I try to use the context of the SQL statement (Sum([DS-Work-Log-May 2015].Num_of_ACCN) DESC) Access gives me an error message that says I am not allowed to use aggregate functions in sorts...

Any ideas of what I can do to accomplish my task??
 
Upvote 0

Forum statistics

Threads
1,215,239
Messages
6,123,817
Members
449,127
Latest member
Cyko

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top