Problem with sorting report

lovett10

Registered User.
Local time
Today, 10:32
Joined
Dec 1, 2011
Messages
150
Thanks for any help in advanced.

In a recent thread vbaInet helped me with the piece of code below

Code:
Reports!VisitSheetTableReport.OrderBy = "[QuoteNumber] ASC"
Reports!VisitSheetTableReport.OrderByOn = True

Whilst this works and in the report it says its being sorted in that way. it doesnt actually change from default (Date Of Work Descending) even when i tell it to go by Date Of Work Ascending

Im using Access 2010.

heres the full code (im using check boxes in a form for the user to decide how they want it to be sorted)
Code:
If chkDate = True Then
        Reports!VisitSheetTableReport.OrderBy = "[Date Of Work] ASC"
        Reports!VisitSheetTableReport.OrderByOn = True

Thanks in advanced for any help much appreciated
 
I wonder why you didn't continue the conversation in that thread?

How are you sure that it actually gets to that block of code?
 
I wonder why you didn't continue the conversation in that thread?

How are you sure that it actually gets to that block of code?


Because in the report under the Filter/Sort section in shows the correct sort. But it doesnt actually sort it
 
Of course we would. ;) Any helper can see all the threads.

If you apply the sort manually in the OrderBy property and open the report, does it sort properly? Is the data type of the field a true Date/Time field?

Do you have any other sorting in place? Do you have a group by in place?

Do you have a sort in the query itself?
 
Of course we would. ;) Any helper can see all the threads.

If you apply the sort manually in the OrderBy property and open the report, does it sort properly? Is the data type of the field a true Date/Time field?

Do you have any other sorting in place? Do you have a group by in place?

Do you have a sort in the query itself?


no even if i do it manually it doesnt sort.

I dont think i have any other sorting in place, again dont think i have any grouping either

And i dont have an actuall query for the report just the sort/filter inside the report
 
It won't take you forever to create a sample db in Access (i.e. one table - two or three fields, one query, one report), enter some sample data and upload it.
 

Users who are viewing this thread

Back
Top Bottom