Query MS Sql Table

Always_Learning

Registered User.
Local time
Today, 23:52
Joined
Oct 7, 2013
Messages
71
Hi There,

I have an Access database that is using MS SQL Database as the backend.

I need to run a query with an order by ClosedDate DESC

When the query is run from an Access Procedure the data is not showing correctly on the report but if I run the query from within the Access designer it returns in the correct order.

Am I missing something.

Thanks for any help.
 
Reports have their own sorting and grouping routines and may not use ( or overwrite) the sort order in your query.

Just a thought.
 
Hi There,

I cannot see where the report has a sort order.

In the report data tab it say's that recordsource is Query_MemCloseDate

If I double click Query_MemCloseDate it returns the records in the right sort order.
If I double Click the report the report comes back showing the records ordered by the primary key.

I have got to be missing something obvious but I can't see it.

Thanks for your help.

All the best.
 
Open the report in design view, click on the report header and then right click, choose the option "Sorting and Grouping", then click on the "Add Sort", (it shows up below the report).
 
Open the report in design view, click on the report header and then right click, choose the option "Sorting and Grouping", then click on the "Add Sort", (it shows up below the report).

Your a star. Worked perfect.

Thanks for taking the time, I appreciate it.

Best Regards,
 
You're welcome, luck with your project.
 

Users who are viewing this thread

Back
Top Bottom