?
Solved

Sorting on Report

Posted on 2011-10-14
4
Medium Priority
?
263 Views
Last Modified: 2013-11-05
I have a query that is the datasource for a report.  When I run the query and look at the data the criteria to sort by Payment (descending).  When I run the report, it's sorted alphabetically by person's last name and doesn't sort by Payment.  See screenshots.  

The button that calls the report is very simple:

    Dim stDocName As String

    stDocName = "rptRegistration"
    DoCmd.OpenReport stDocName, acPreview

I also checked to make sure the Report doesn't have code on the OnLoad that would sort.

Where else could I look to find filters that would be overiding my report sort order?

ee-query-sort.JPG
ee-report-datasource.JPG
0
Comment
Question by:gcgcit
  • 2
4 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 36967811
Reports have a seperate Sorting and Grouping feature that may appear to override the ordering in your query.

I would check there...
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 36967819
You can get to that feature by right-clicking the little grey square in the upper left hand corner of your report in design view, and selecting 'Sorting and Grouping'.
0
 

Author Closing Comment

by:gcgcit
ID: 36967899
You're a genius thanks... that's exactly where it was.  The person who originally made the report sorted by last name in there!
0
 
LVL 58
ID: 36967942

 Just as an add on comment, reports by design ignore any sorting in the data they are based on as they need to control that in order to do things like group levels and totaling.

  They could not provide those features if they relied on the underlying datasource to do the sorting.

Jim.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question