G
Guest
I'm getting a strange result - data in a table is sorted before its read in
the VBA macro, but comes out in a different order. Anyway to maintain the
sort order?
More Details:
I read a table generated by a query into a recordset using the following code:
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("myQuery")
The table is sorted in the "myQuery" .
Then we read the recordset one record at a time and output the record:
rst.MoveFirst
Do Until rst.EOF
Call OutputRec(dbs, rst, outTable) 'Sub that executes sql insert
statement
rst.MoveNext
Loop
The output table is NOT in the same order as input data from myQuery.
Is there any way to make Access mainatain the sort order? Maybe its me, but
its crazy that the order isn't maintained in such a simple process.
Thank you,
Mark
the VBA macro, but comes out in a different order. Anyway to maintain the
sort order?
More Details:
I read a table generated by a query into a recordset using the following code:
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("myQuery")
The table is sorted in the "myQuery" .
Then we read the recordset one record at a time and output the record:
rst.MoveFirst
Do Until rst.EOF
Call OutputRec(dbs, rst, outTable) 'Sub that executes sql insert
statement
rst.MoveNext
Loop
The output table is NOT in the same order as input data from myQuery.
Is there any way to make Access mainatain the sort order? Maybe its me, but
its crazy that the order isn't maintained in such a simple process.
Thank you,
Mark