On Sun, 08 Jun 1997 07:01:15 -0600, yosi@aleph.co.il wrote:

>the table. The problem appeared when I export the table to a text file.
>The order of the records in the text file was the order of the adding of
>the records and not the order they appeared in the database according to
>the key. How can I keep the order seen in the database to be the order of
>the records in the text file? Many thanks to anybody that might help me!

Open the recordset (snapshot/dynaset depending on the version of vb) with a
SQL statement where you set the sorting order.

like this:

Dim SQL$
Dim rs As Recordset

SQL$ = "SELECT * FROM " & yourtable
SQL$ = SQL$ & " ORDER BY " & yoursortingfield
Set rs = OpenRecordset(SQL$)
Do While Not rs.EOF
	'print all