Sorting Alphabetically and by date

J

Joe

Hi,

I maintain a small datebase in version 2003. I have the data sorted by
first name and last name, but I am also looking to sort by date, so that
"jones" comes before "Smith" and all records for "Smith" would be in date
order as well with the most recent record on top . I am using the long date
format in the date field

Thanks
 
R

Ron2006

Use a query to select the data for the form

align the fields in the sequence to be sorted. ie LastName field then
datefield then first name

select ascending for sequence for lastname
select descending for sequence for datefield.
select ascending for sequence for firstname


Ron
 
J

John W. Vinson

Hi,

I maintain a small datebase in version 2003. I have the data sorted by
first name and last name, but I am also looking to sort by date, so that
"jones" comes before "Smith" and all records for "Smith" would be in date
order as well with the most recent record on top . I am using the long date
format in the date field

Thanks

First off... tables are not sorted.

Use a Query based on your table. Select the name field, and (to the right of
it in the grid) the date field. Sort Ascending by name and Descending by date.
You can use this query as the recordsource for a form or report.
 
G

Graham Wideman [Visio MVP]

.... what Ron and John said, plus one other thing:

It should be noted that though a table per se has no intrinsic sort order,
and a query can have a sort order explicitly built in... the datasheet view
of both table and query has an additional optional sort order that it can
impose.

So, if you open either a table or view, then select columns, and hit the
"Sort ascending" or "sort descending" button, you'll see a view of your data
sorted by the columns you've selected, in order of columns from left to
right.

This would be one way to quickly accomplish what you want, if it weren't for
the fact that you want some columns ascending, and some descending. So your
purpose, a separate query is the way to go.

But then you still need to know that the datasheet view of the query could
potentially be rearranged by, or disrupted by, the view's own sort order.

For both Tables and Queries, you can get rid of any view sort order by
right-clicking the datasheet's titlebar, and selecting "Remove filter/sort".
For Queries, the view sort order can be seen from design view >right click
in top area > Properties > Order by (and notice that this is different than
whatever Sort settings you have in the design grid.) For Tables I don't know
a way to see the current view's sort order.

Hope that helps,

Graham
 

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