View Full Version : sort order on table from make table query


LaurieR
11-02-2001, 07:02 AM
I am creating multiple tables using a collection of make table queries in a macro, and sorting the new tables (ascending) on a field in the old table that I am not showing in the new tables (unclick the show box). The datasheet view results of the queries are fine, but when I run the queries the tables inconsistently end up ordered incorrectly. I am then exporting them to Excel which is where I discovered that about 15% of the time the tables are not in the correct order. The inconsistency makes testing especially difficult. This is a show-stopper for a new application, any help would be much appreciated. Thanks.

Pat Hartman
11-02-2001, 08:55 AM
Tables/recordsets are unordered sets. It makes NO differenct what sequence was used to load the table. When you read a table, Access will return the rows in whatever order is convienent for it at that time. This means that one time the order may be c,b,a and next time it may be b,a,c at Jet's pleasure. If sequences is important, base your export to Excel on a query with an order by clause rather than directly on a table.

LaurieR
11-02-2001, 11:57 AM
Thank you for this feedback Pat. I will try exporting the queries instead.