Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Order records by field value 1

Status
Not open for further replies.

djayam

Technical User
Aug 16, 2005
95
GB
Hi all,

I have an Orders subform within the Customers form. All I want to do is have the Order records sorted by Orders.OrderDate DESC. I have tried entering "[Orders].[OrderDate] DESC" (without the "") and variations of but it doesn't seem to work! Any ideas?

Cheers,

Jason
 
I have tried entering "[Orders].[OrderDate] DESC"
Entering where ?
What is the the SQL code of the RecordSource of the subform ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV,

Entered that in the Order By property of the subform.
Record Source property of the subform is simply Orders.
 
Either set the RecordSource property to:
SELECT * FROM Orders ORDER BY OrderDate DESC

Or put the following code in the Open event procedure of the subform:
Me.OrderByOn = True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top