Sorting

E

Ernst Guckel

Hello,

Any idea why my report does not sort right? It is supposed to sort by
LastReview.

SELECT tblEmployees.EmpID, tblEmployees.EmpFirst, tblEmployees.EmpLast,
tblEmployees.EmpStatus, tblEmployees.DateOfHire, tblEmployees.EmpFileNumber,
tblEmployees.EmpID, Format(nz(DMax("ReviewDate","tblReviews","[EmpID] = " &
[EmpID]),[DateOfHire]),"dd-mmm-yy") AS LastReview FROM tblEmployees ORDER BY
Format(nz(DMax("ReviewDate","tblReviews","[EmpID] = " &
[EmpID]),[DateOfHire]),"dd-mmm-yy");


Ernst.
 
R

Rob Ward

If your are outputting this query to a report, then you will need to set the
report order within the report - Access reports ignore/overwrite the order in
which data is presented to them from underlying queries.

The Sorting and grouping dialog is selected from the View menu in the report
design view.
 
E

Ernst Guckel

Good to know. You learn something new every day :)

Ernst.


Rob Ward said:
If your are outputting this query to a report, then you will need to set the
report order within the report - Access reports ignore/overwrite the order in
which data is presented to them from underlying queries.

The Sorting and grouping dialog is selected from the View menu in the report
design view.
--
Rob Ward


Ernst Guckel said:
Hello,

Any idea why my report does not sort right? It is supposed to sort by
LastReview.

SELECT tblEmployees.EmpID, tblEmployees.EmpFirst, tblEmployees.EmpLast,
tblEmployees.EmpStatus, tblEmployees.DateOfHire, tblEmployees.EmpFileNumber,
tblEmployees.EmpID, Format(nz(DMax("ReviewDate","tblReviews","[EmpID] = " &
[EmpID]),[DateOfHire]),"dd-mmm-yy") AS LastReview FROM tblEmployees ORDER BY
Format(nz(DMax("ReviewDate","tblReviews","[EmpID] = " &
[EmpID]),[DateOfHire]),"dd-mmm-yy");


Ernst.
 

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

Top