G
Guest
The sort order of the table comes out different after it has been processed
in a module. I didn't anticipate that happening at all - the first record in
is the first one out and so on to the last record in is the last record out -
but that is not what Access is doing. Any way to tell Access to maintain the
record order on the table?
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 maintain the sort order? Maybe its me, but
its crazy that the order isn't maintained in such a simple process.
Thank you,
Mark
in a module. I didn't anticipate that happening at all - the first record in
is the first one out and so on to the last record in is the last record out -
but that is not what Access is doing. Any way to tell Access to maintain the
record order on the table?
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 maintain the sort order? Maybe its me, but
its crazy that the order isn't maintained in such a simple process.
Thank you,
Mark