Query Not Sorting?

paul1707

Paul1707
Local time
Tomorrow, 06:21
Joined
May 24, 2008
Messages
27
Hi All,

I hope you are all well.

I am trying to get a query to sort on 3 variables. The first two are sorting correctly but the third isn't.

The query is run from a table and the data is only used for a report.

I have enclosed the sql, am i asking to much? (Still a little new to access)

SELECT tblJobs.InstLastName, tblJobs.SchedInstallDate, tblJobs.Suburb, tblJobs.ClientName, tblJobs.ClientMobile, tblJobs.BuilderAbbr, tblJobs.SuperFirstName, tblJobs.SuperMobile, tblJobs.LotNo, tblJobs.HseNo, tblJobs.Street, tblJobs.InstallType, tblJobs.RhoodType
FROM tblJobs
WHERE (((tblJobs.JobStatus)="Scheduled"))
ORDER BY tblJobs.InstLastName, tblJobs.SchedInstallDate, tblJobs.Suburb;

Thanks in advance.

Paul
 
Shouldn't be a problem. What do you mean when you say it isn't? You realize you have to set the sorting in the report Sorting and Grouping for the report to sort properly?
 
Yes i have checked the result in the report and it is the same.

I grouped the report by InstLastName and SchedInstallDate and set the sort order on the date and the suburb.

The Date is correct but the Suburb is not.

Thanks
 
Is the suburb selected via a table level lookup?
 
Hi Neil,

Just as you suspected, the suburb was from the jobs table and not the suburb table, added the suburb table to the query and pointed the suburb to the suburb table and all is good!

It works as it should and is reporting correctly.

Thanks Neil and Paul
 
Not really what I meant, but if it works, so what!
 

Users who are viewing this thread

Back
Top Bottom