Order by Asc or Desc a"Total Sum" in a Crosstabquery

N

Nemo

Hi All,

is there an expedient, in sorting the TotalSumField by Asc or Desc directly
in a crosstabquery?
It gives me this kind of error message:

Impossible having an aggregation function in the clause ORDER BY
(Sum(TBlEmployees.Amount)


I solved the problem building a Selection Query, based on the crosstabquery,
ordering the TotalSumField by Desc.

In this way the final report is based with two queries and not one only.

TIA

Nemo
 
J

John Spencer

It MIGHT be possible to do this in one query. However, since we have no
idea what your query (or queries) look like it is impossible to suggest
any solution.

AND if you are doing this for a report, you should be aware that ORDER
BY on a query has almost nothing to do with the report's sorting of the
data. You should set up sorting for a report using the report's Sorting
and Grouping dialog (Menu: View: Sorting and Grouping).


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
N

Nemo

Thanky John,
It works perfecty!!.....and I have already amended the DB.
Thanks for you help.
Nemo
 

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