query Order By help

rkrause

Registered User.
Local time
Today, 05:41
Joined
Sep 7, 2007
Messages
343
I have a query that i wanted ordered by most recent date so that the note date shows July first, then June, then May and so on.

heres my sql

strSQL = "SELECT tblCollectionNotes.NoteID, tblCollectionNotes.CustID, tblCollectionNotes.CollNote, " & _
"tblCollectionNotes.NoteDate, tblCollectionNotes.InvoiceNumber " & _
"FROM tblCollectionNotes, tblDelinquentInvoices " & _
"WHERE (((tblCollectionNotes.CustID)='" & gstrCurCustID & "'))" & _
"and tblCollectionNotes.CustID = tblDelinquentInvoices.CustID and " & _
"tblCollectionNotes.InvoiceNumber = tblDelinquentInvoices.InvcNum " & _
"ORDER BY tblCollectionNotes.NoteDate;"
 
Try

"ORDER BY tblCollectionNotes.NoteDate DESC;"
 
I'm having the same problem:

SELECT Requisitions.[Requisition #], Requisitions.[New Hire DeptID], Requisitions.[Requisition Type], Requisitions.Dated, Requisitions.Status, Requisitions.[VMC Job Title], Requisitions.Manager, Requisitions.Director, Requisitions.Budgeted, Requisitions.Candidate, Requisitions.Project, Requisitions.[Replacing Employee], Requisitions.PayRange1, Requisitions.PayRange2
FROM Requisitions
WHERE (((Requisitions.Status)="approved" Or (Requisitions.Status)="pending" Or (Requisitions.Status)="Discussion") AND ((Requisitions.[Type of Hire])="external"))
ORDER BY Requisitions.Manager DESC;

It just isn't doing the "order by"
 
I can't see why it wouldn't. Can you post a sample?
 

Users who are viewing this thread

Back
Top Bottom