How do I sort datasheet showing 2005 info before 2006 info.

S

StarrKittrell

I want to sort data in month, day, year order, ie: 01-05-05 versus 01-05-06.
The way I have it now my 2006 data is being mixed up with my 2005 data
depending on the month and/or day. I want all 2006 data to come after 2005
data when I perform a sort by date. I am using Microsoft Access 2002.
 
W

Wayne Morgan

Create "calculated fields" in the query. You can uncheck the Show box for
these fields, they will only be used for sorting purposes. In SQL view the
fields would only appear in the ORDER BY clause.

Example:
ORDER BY Month([Table1].[DateField]), Day([Table1].[DateField]),
Year([Table1].[DateField])
 
W

Wayne Morgan

Sorry, in the previous post I went with your first line that said you wanted
"month, day, year" order. The sort order is from left to right, rearranging
the items in the previous post will change the sort order. To have all of
the 2006 data come after the 2005 data though, would be a normal sort. It
could be done as 3 separate items, but if the field is defined as a date
field, then this would be the normal Ascending sort for that field. When you
create a query on the table that has the data, just set the Sort Order for
the date field to Ascending. This will place the dates in chronological
order.
 
T

Tom Wickerath

Hi Starr,

You can use a query as the source of data for a subdatasheet, specifying the sort order within
the query. To do this, first create your query and save it. Then open the table in datasheet
(normal) view. Click on Insert > Subdatasheet... and pick your new query using the Queries tab
to filter out the tables. That being said, be aware that in a multi-user database, subdatasheets
can negatively affect performance.

BUG: Slow performance on linked tables in Access 2002 and Office Access 2003
http://support.microsoft.com/kb/275085

Tom
________________________________

I want to sort data in month, day, year order, ie: 01-05-05 versus 01-05-06.
The way I have it now my 2006 data is being mixed up with my 2005 data
depending on the month and/or day. I want all 2006 data to come after 2005
data when I perform a sort by date. I am using Microsoft Access 2002.
 
Top