Query Date Order Question

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

--
How can I do a sort by :
Oldest Date
Earliest Date
No date
In my Date Column in a Query?
Thanks ......Bob






..........Jenny Vance
 
In query design view, you can sort oldest-to-newest by choosing:
Ascending
in the Sorting row under this field.

Descending gives newest-to-oldest.

The blank dates sort first. To sort them last, type this into a fresh column
in the Field row, to the *left* of your date field (since sorting works
left-to-right across the design grid):
[MyDate] Is Not Null
replacing "MyDate" with the name of your date field.

In your list, I'm not clear on what you meant by the difference between
Oldest Date and Earliest Date.

If you want to see how Access actually handles the sorting, switch the query
to SQL View (View menu in query design), and look at the ORDER BY clause
near the end of the query statement.
 
G'Day Bob,

You can do the first two at the same time (if I understand your need):
Oldest Date
Earliest Date
Use an aggregate (? [Totals] on the toolbar) Query
Put your date column in twice
Group by Max in the first column
Group by Min in the second
.... you will then see the Greatest and Least dates on a single row.
Use a Select Query
Use the criterion Is Null
.... you will see all rows with missing dates.
 
Brilliant Allen made new column and had ascending,ascending , Brilliant
thanks...bob
Allen Browne said:
In query design view, you can sort oldest-to-newest by choosing:
Ascending
in the Sorting row under this field.

Descending gives newest-to-oldest.

The blank dates sort first. To sort them last, type this into a fresh
column in the Field row, to the *left* of your date field (since sorting
works left-to-right across the design grid):
[MyDate] Is Not Null
replacing "MyDate" with the name of your date field.

In your list, I'm not clear on what you meant by the difference between
Oldest Date and Earliest Date.

If you want to see how Access actually handles the sorting, switch the
query to SQL View (View menu in query design), and look at the ORDER BY
clause near the end of the query statement.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Bob said:
--
How can I do a sort by :
Oldest Date
Earliest Date
No date
In my Date Column in a Query?
Thanks ......Bob
 
Off Topic
------
Arvin,
Did you get my DB re Holidays, I sent it to your Datatstart email address.

Regards
Jacob
 
But pat I want to o see the records without the date but underneath oldest,
earlist...regards bob
Pat Garard said:
G'Day Bob,

You can do the first two at the same time (if I understand your need):
Oldest Date
Earliest Date
Use an aggregate (? [Totals] on the toolbar) Query
Put your date column in twice
Group by Max in the first column
Group by Min in the second
... you will then see the Greatest and Least dates on a single row.
Use a Select Query
Use the criterion Is Null
... you will see all rows with missing dates.
--
Regards,
Pat Garard
Melbourne, Australia
_______________________

Bob said:
--
How can I do a sort by :
Oldest Date
Earliest Date
No date
In my Date Column in a Query?
Thanks ......Bob






.........Jenny Vance
 
Arvin,

I did misspelled datastrat (but got no rejection).

Resent to datastrat with the subject "Access NG-Holidays (And Others Global)
DB"

Regards
Jacob
 

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

Similar Threads

Sort Order In a Query 12
Date Problem 2
Access wont sort Correctly! 13
Query sort on Date! 3
Oldest date in Query 11
Command Button Query 3
Order in a Query Question 1
Sort on a Query 7

Back
Top