|  | Sorting Alphabetically and by date |  | |
| | | Joe |  |
| Posted: Fri Aug 22, 2008 5:46 pm Post subject: Sorting Alphabetically and by date |  |
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 |
| |
| | | John W. Vinson |  |
| Posted: Fri Aug 22, 2008 6:13 pm Post subject: Re: Sorting Alphabetically and by date |  |
On Fri, 22 Aug 2008 12:46:03 -0700, Joe <Joe @discussions.microsoft.com> wrote:
| Quote: | 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. --
John W. Vinson [MVP] |
| |
| | | Ron2006 |  |
| Posted: Fri Aug 22, 2008 8:02 pm Post subject: Re: Sorting Alphabetically and by date |  |
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 |
| |
| | | Graham Wideman [Visio MVP |  |
| Posted: Fri Aug 22, 2008 10:39 pm Post subject: Re: Sorting Alphabetically and by date |  |
| |  | |
.... 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
-- --------------------------------------------------- Graham Wideman --------------------------------------------------- Book/Tools: Visio 2003 Developer's Survival Pack Resources for programmable diagramming at: LINK
"Joe" <Joe @discussions.microsoft.com> wrote in message news:A66788B5-A68E-4F77-B965-9B82E1CAE3B5@microsoft.com...
| Quote: | 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 |
|
| |
|
|