Secondary Sorting in a table

M

mbergman

How do you define a sort order in a master table? I.E. I
have a large table that lists candidates with numerous
fields. I candidates to be listed by last name, then all
candidates with the same last name to be sorted by first
name. The sort order would update each time a new
candidate is entered.
 
K

Kim

You can either use a query. If you open your table and
click the Records Menu and do an advanced filter/sort it
will take you to a new query.

Or, try this....

highlight the two columns at the same time and click
Records > Sort > Sort (asc/desc)
 
T

Tim Ferguson

I candidates to be listed by last name, then all
candidates with the same last name to be sorted by first
name.

Put a sort in the query

SELECT ....
FROM Master
ORDER BY LastName, FirstName

or just set the options in the query design grid.

There is a hint in the question, although I am sure that I am mistaken,
that you are actually using the table datasheet to edit records; but this
is such a cruel and nasty thing to do to your users it cannot be true. I am
certain that you are using a form based on a query, which can be easily
sorted as above.

Best wishes


Tim F
 
S

Steve Schapel

mbergman,

Data in tables are not sorted. Generally there is no need to do so,
as in normal usage of a database, no-one ever sees the table anyway.
You can abtain a dataset sorted in the way you want, for your purposes
on form or report, by applying sorting in a query based on the table.

- Steve Schapel, Microsoft Access MVP
 
J

John Vinson

How do you define a sort order in a master table? I.E. I
have a large table that lists candidates with numerous
fields. I candidates to be listed by last name, then all
candidates with the same last name to be sorted by first
name. The sort order would update each time a new
candidate is entered.

You don't.

A Table is an unordered "bag" of data. Access will store the records
wherever there is room on disk.

If you want to see the candidates in alphabetical order, use a Query
based on the table, sorted by last name, first name, and any other
desired sort fields.
 

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