Weird Sort Order in SQL Statement (1 Viewer)

Daveyk01

Registered User.
Local time
Today, 07:44
Joined
Jul 3, 2007
Messages
144
If I use the following SQL statement, the Dates sort Ascending order and the time assorts in Descending order:

strSQL = "Select * From [tmpTempSAPFiles] Where [Technician] = '" & Forms!frmCertify!Technician & "' ORDER BY [FileDate], [FileTime] DESC;"
I need the data to sort DESCENDING by FileDate and the DESCENDING by FileTime.

I'll have to do a little research in ORDER BY with Multiple fields. The help does not work with my installation of Access 2010. So I come here first to the most helfull place in the internet :cool:.

Dave
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:44
Joined
Aug 30, 2003
Messages
36,137
That's not weird, it's exactly what you've told it to do (unintentionally of course). Try

ORDER BY [FileDate] DESC, [FileTime] DESC
 

Daveyk01

Registered User.
Local time
Today, 07:44
Joined
Jul 3, 2007
Messages
144
Well, "duh" on me <g>. I could not see the trees for the forest.

Thanks!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:44
Joined
Aug 30, 2003
Messages
36,137
No problem; we all have those "duh" moments. :p
 

Users who are viewing this thread

Top Bottom