Then open the recordset using a query that is based on the table. You can
either define the SQL of the query in the code or used a stored query. You
don't have to open the recordset directly on the table. You can sort as
desired in the query, this will cause your recordset to be sorted.
Example:
strSQL = "SELECT * FROM Table1 ORDER BY Table1.DateField;"
Set rst = CurrentDb.OpenRecordset(strSQL)
or
Set rst = CurrentDb.OpenRecordset("NameOfQuery")
Add other parameters as needed.
--
Wayne Morgan
MS Access MVP
"Geert Elias" <ge*********@plastal.com> wrote in message
news:42********@127.0.0.1...
Indeed, I base my conclusion on the incorrect sorting on the result
table after running the query.
The column that has to be sorted in descending order is a DATE ( general
date ).
The problem is that I use this generated table as a base for a VBA
application that search data with the 'MoveNext' command (recordset).