Sort lines in an MS Access sub-report

I defined a query, sorted in ascending certain order.
I build a sub-report based on this query alone.
The sub-report is not sorted in the same order as the query.
Any ideas?
How can I determine what the sort order of the sub-report will be.
Fritz PaulAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
Because reports are sorted according to the Grouping and Sorting options of the report, not based on the sorting of the query.
Fritz PaulAuthor Commented:
I hear you. Thanks.
I have now set the sub-report's Order By, When I open the sub-report alone, the sort sequence is now the same as that of the query,(because I set it up like that), but in the main report, it is still sorted the other way round.
How can I force the sub-report to sort in a given order when it opens in the main report?
Jeffrey CoachmanMIS LiasonCommented:
It is not clear if: "a given order" means: "the same order as the main form"

It also sound like this report can be used as both a main report and a sub report....?

...So can you first take a step back and explain a bit more about this/these Reports, (their design and purpose)
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Fritz PaulAuthor Commented:
Accept my apologies that I was not aware that you gave a comment to my question.

The problem is:

The subreport contains a list of detail ingredients of a recipe. The query of the subreport lists the ingredients in reverse order, from large to small. The subreport can be opened on it's own, showing all ingredients to all recipes, and has the same order as the query, i.e. high to low.
The subreport is included in the main report, with a  parent child relationship on the subreport query index, while the main report filters only the main report recipe index.
The problem now is that the ingredients on the subreport is now reversed and I can not see why.

The database is attached. The report to open is RPTRECIPE with
Forms!frmRecipeSelect!RecipeFor = 3.

Jeffrey CoachmanMIS LiasonCommented:
So is your ultimate question here how to sort the Total Cost Column in Descending order (Highest to the lowest)?

If so then:
1. Make the source for that Total Cost control the query field "Total Cost" (Not a calculated field)
2. Use the Sorting/Grouping options to set a sort of "Total Cost" Descending

The Modified FE is attached.
You will have to relink the BE table to your original path to the BE


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
Just FYI:

Sample database notes:
1. Back up your database(s).
2. Combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Compile the code. (From the VBA code window, click: Debug-->Compile)
10. Run the compact/Repair utility.
11. Remove any Passwords and/or security.
12. If a form is involved in the issue, set the Modal and Popup properties to: No
    (Again, unless these properties are associated with the issue)
13. Post the explicit steps to replicate the issue.
14. Test the database before posting.

In other words, a database that we can easily open and immediately see and/or troubleshoot the issue.
And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.
Fritz PaulAuthor Commented:
You are my hero!
Thanks a lot.
Jeffrey CoachmanMIS LiasonCommented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.