Sorting

ryetee

Registered User.
Local time
Today, 02:30
Joined
Jul 30, 2013
Messages
952
I have a split form that displays the records from a table.
In the data tab on the property sheet for the form I have the record source as the table I want to display TBExpenses.
In the "Order by" property I have TBExpenses.dtmdate desc
This is not working. Whatever I put in "Order By" I always get the order as ascending autonum. Am I missing something? I read somewhere you have to set OrderByOn = True. I'm not sure where this is although I have tried Forms.OrderByOn = True and Me.Forms.OrderByOn =True in the open and load events of the form.

I have the following
Record Source - TBExpenses
record Type - dynaset
fetch Details - Yes
Filter - blank
Filter on Load - No
Order By - TBExpenses.dtmdate desc
Order By o load - yes
wait for processing - no
Allow additions - no
Allow deletions - no
Allow edits -yes
Allow filters - yes
Record Locks - no locks

H E L P !!
 
are you using query as datasource, check if there is a sorting order and remove it.
 
are you using query as datasource, check if there is a sorting order and remove it.


I wasn't but changed it to use a query and it now works.

How come it didn't work using the table itself?
 
I wasn't but changed it to use a query and it now works.

How come it didn't work using the table itself?

Omit the table name in your Order by, just use the field name. The table name is referenced in the record source of the property sheet.

Code:
Order By [COLOR="Red"]TBExpenses[/COLOR].dtmdate desc]

Code:
Order By dtmdate desc
 
Omit the table name in your Order by, just use the field name. The table name is referenced in the record source of the property sheet.

Code:
Order By [COLOR="Red"]TBExpenses[/COLOR].dtmdate desc]

Code:
Order By dtmdate desc

Already tried that as well as with and without [ and ]
I now have a query which I presort.
Still intrigued to find out why former doesn't work.
 
Could you post a sample.
 

Users who are viewing this thread

Back
Top Bottom