Permanent sort in table

G

Guest

I have three fields which I want to use to sort the data in a table – a
primary, secondary and tertiary sort.

I have tried using the sort in datasheet view with the fields positioned so
that the primary field is on the left of the secondary and that is to the
left of the tertiary sort field. Initially this works ok but the sort
doesn’t hold.

Is there a way to set up a permanent sort on three fields in a table which
will not be overwritten. I thought maybe the index field in design view
might do this but there doesn’t seem a way to specify which is the primary,
secondary and tertiary.

I am using 2003
 
J

Joseph Meehan

Mary said:
I have three fields which I want to use to sort the data in a table -
a primary, secondary and tertiary sort.

I have tried using the sort in datasheet view with the fields
positioned so that the primary field is on the left of the secondary
and that is to the left of the tertiary sort field. Initially this
works ok but the sort doesn't hold.

Is there a way to set up a permanent sort on three fields in a table
which will not be overwritten. I thought maybe the index field in
design view might do this but there doesn't seem a way to specify
which is the primary, secondary and tertiary.

I am using 2003

Use a query and you can do exactly what you want. Tables are not sorted
and you should not expect them to maintain any specific order. You can use
the query as a data source for reports, forms and other queries.
 
J

John Vinson

Is there a way to set up a permanent sort on three fields in a table

No.

A table HAS NO ORDER. It's an unsorted "heap" of data.

If you want to see records in a particular order, the correct method
is to index the three fields so that sorting will be fast and
efficient, and use a Query with an Order By clause on the three
fields. This Query can be used in any context where you would
otherwise use the Table.

Note that table datasheets are not designed or intended for user
interaction - you should not generally be exposing them to user view
at all, so the order of records in the table is (or should be!)
irrelevant anyway.

John W. Vinson[MVP]
 
G

Guest

Thank you - very clear!

John Vinson said:
No.

A table HAS NO ORDER. It's an unsorted "heap" of data.

If you want to see records in a particular order, the correct method
is to index the three fields so that sorting will be fast and
efficient, and use a Query with an Order By clause on the three
fields. This Query can be used in any context where you would
otherwise use the Table.

Note that table datasheets are not designed or intended for user
interaction - you should not generally be exposing them to user view
at all, so the order of records in the table is (or should be!)
irrelevant anyway.

John W. Vinson[MVP]
 
G

Guest

Thank you Joseph. I shall do that and incorporate indexes as per John
Vinson's message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top