Sort Help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table, sorted ASC on 3 fields....SSN#, Contract Number, and Date.

In the "Order By" Property in the design view of the table it says:

.[Owner SSN],
.[Date],
.[Contract Number]

Now, when I create a recorset object and try to navigate through the
records, why is the data suddenly unsorted?? How do I use the "Sort" command
in VBA??
 
Define the sort in the Recordset, just as you define in a query

Select * From TableName Order By Field1,Field2,Field3

If the sort type is not defined, it will sort Asc, the default.
If you want to sort Desc you have to define it

Select * From TableName Order By Field1 Desc,Field2 Desc,Field3 Desc
 
Back
Top