Solved

Trying to get a sub-report to open sorted by ItemN

Posted on 2016-07-25
1
17 Views
Last Modified: 2016-07-25
I have a form that has a sub-form.  I have been able to make the sub-form sort the records in descending order by setting OrderBy = [ItemN] in the Form Data properties.

But I have a report opening from a command button on the form and the details in the sub-report WILL NOT sort in the proper order even though the record source for the sub-report is a query with the field ItemN set to descending.

??
0
Comment
Question by:SteveL13
1 Comment
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 41728532
Reports handle sorting much differently, and will ignore the sorting set in a query. Instead, add a Sort to your report in Design view. The Grouping and Sorting box is shown at the bottom of the Design window. If you don't see it, click the "Group & Sort" item in the Grouping & Totals ribbon item.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA to copy the database back end to a new database file. 3 34
Combobox row source 2 20
Trying to open FORM in specific record !! 6 45
Binding recordsets to a form 6 23
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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