Sorting Order Changes from Running Macro
- From: "Mark" <Mark@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 5 Aug 2005 09:43:02 -0700
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
.
- Follow-Ups:
- Re: Sorting Order Changes from Running Macro
- From: Marshall Barton
- Re: Sorting Order Changes from Running Macro
- Prev by Date: Re: updating labels
- Next by Date: Re: Switchboard addition
- Previous by thread: Type mismatch initializing recordset variable?
- Next by thread: Re: Sorting Order Changes from Running Macro
- Index(es):
Relevant Pages
|