Query Sort same as table

T

TJAC

I imported a table and it is in no particular sort order, when I run a query
based on this table, I would like the order of items to be the same as the
table. However, they appear to be sorted by sku even though I have never
specified a sort order. Is there a way for the query to keep the same sort
order as the table?

Thanks!
 
S

Scott McDaniel

I imported a table and it is in no particular sort order, when I run a query
based on this table, I would like the order of items to be the same as the
table. However, they appear to be sorted by sku even though I have never
specified a sort order. Is there a way for the query to keep the same sort
order as the table?

I don't think there's any way to tell the query "use the same sort order as the underlying table", but you can specify a
sort order on the query ... just select your desired column in Design view, and then select Ascending or Descending in
the Sort dropdown just below the column name.

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
W

Wayne-I-M

Hi

You "can" sort a table but there is really no use as it is simply used to
store raw data - not for "working on". Sort the query as you want and ignor
the sorting on the table completley.
 
J

John W. Vinson

I imported a table and it is in no particular sort order, when I run a query
based on this table, I would like the order of items to be the same as the
table. However, they appear to be sorted by sku even though I have never
specified a sort order. Is there a way for the query to keep the same sort
order as the table?

If the order of data as received is important to you, you must - no option! -
include a field in the table to preserve that order. Tables are just unordered
"buckets" of data; Access will present the records in whatever order it finds
convenient. If the SKU is the Primary Key that's probably why you're getting
that as the sort order.

One way to do this is to pre-build the table with all the fields in the import
file, and one additional Autonumber field. Link to the import file and run an
Append query appending to all the other fields; the autonumber will increment
and give you a "handle" for sorting queries later.

John W. Vinson [MVP]
 
Top