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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Sort the Recordset by Field

Status
Not open for further replies.

ppedersen1

Technical User
Oct 14, 2002
43
US
I need some direction. I have a DAO connection to an Access database where I get data. Each field in the Access database is displayed separately in a textbox in my program. I would like to sort the main field name (called "Name") in ascending order. Currently is doesn't do this. How is this done?

I was thinking that "data1.recordset.sort" would provide an option for the field name with an option to select either ASC or DESC, but I can't find this. Where should I go?
 

Try changing the recordsource to:

SELECT * FROM TheTable ORDER BY Name ASC

[/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top