Priority

A

Aria

I'm working on my first db and have moved on to creating reports. I have a
table for Subjects with a field for priority. This table is in regards to
substitute teachers and their preferred subjects. I would like the report to
list the subjects with the sub teachers name who has priotized that subject
as one of their most preferred. A sub can be listed multiple times on the
report for each subject they prefer. The query is returning the values in the
order I would like but I also wanted the teachers listed in alphabetical
order which is the problem I am currently experiencing. I have tried sort
ascending for the last name then first name but then the subjects are not in
order. I'm new to sub reports and was wondering if that is what I need in
order to get this as needed. Can someone help me?

Here is the SQL:

SELECT tblEmployees.LastName, tblEmployees.FirstName,
tblEmployees.HomePhone, tblSubjects.SubjectName, tblSubjectsEmps.Priority
FROM tblSubjects INNER JOIN ((tblClassifications INNER JOIN tblEmployees ON
tblClassifications.ClassID = tblEmployees.ClassID) INNER JOIN tblSubjectsEmps
ON tblEmployees.EmpID = tblSubjectsEmps.EmpID) ON tblSubjects.SubjectsID =
tblSubjectsEmps.SubjectID
WHERE (((tblSubjectsEmps.Priority)<20) AND
((tblClassifications.ClassDescription)="Substitute"))
ORDER BY tblSubjects.SubjectName, tblSubjectsEmps.Priority;
 
K

KARL DEWEY

Access will disregard any sorting done in a query when displayed in a report.
You must use the report Grouping And Sorting.
 
A

Aria

Thank you, Karl.
--
Aria W.


KARL DEWEY said:
Access will disregard any sorting done in a query when displayed in a report.
You must use the report Grouping And Sorting.
 

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


Top