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

Orde By

Status
Not open for further replies.

gpk

Programmer
Aug 4, 2002
1
AU
I want to order the details I see on a form using 2 indexes?
Can someone please tell me how I do this?
 
Create your indexes in table design view. You have to decide whether the field will allow duplicates or if it will be the primary key for the table. Then create a query based on this table. The two fields you want to sort by must be the left-most in the query window. The field you want to sort first by will be in the left-most position. The other field will be to its right. In query design view, click ascending under sort. Then create a form based on this query. Your records will display in the sort order chosen in the query.
 
Dim SQL As String

SQL = " Select * From table1 Order By Name,City "

First it order by the name and then from the city

The Indexes of a Access database is good for a seek in DAO but not while order by Eric De Decker
vbg.be@vbgroup.nl

Licence And Copy Protection AxtiveX.

Download Demo version on my Site:
Promotions before 02/28/2001 (free source codebook),visite my site
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top