Problem getting descending order in select statement to work

aussie_user

Registered User.
Local time
Today, 02:29
Joined
Aug 6, 2002
Messages
32
I have the following lookup statement

SELECT DISTINCTROW [Year] FROM [Year] ORDER BY [Year DESC];

I have a PROJECT Table that I need to indicate the year that the project commenced. Once all of the historical data has been input, the most frequent year used will be current year. My YEAR Table consists of one Field that includes all of the years that had projects. If I use this statement, an error box pops up the first time I try and use the dropdown box. The years are showing in Descending Order. If I remove the DESC then no error box pops up but the years appear in ascending order and the user has to scroll down to find the current year. The same problem occurs when I create input forms. Is there something wrong with my statement or something different that needs to be done to get the dropdown list to appear in reverse (descending) order?

Thanks for any help.
 
SELECT DISTINCTROW [Year] FROM [Year] ORDER BY [Year] DESC;
 
Thanks Tim, from the help it appeared that the DESC would be inside the brackets. It works fine now.

I take it Year is a bad name to use, thanks for the warning. I'm still working on building the database so it is not to late to change the name.
 

Users who are viewing this thread

Back
Top Bottom