Sort data by the priority and date

garyu87

New member
Local time
Today, 14:09
Joined
Aug 9, 2012
Messages
2
Hi,

I would like to know, how to display the data based on the priority and date.
It should look like this:

Company Name Equipment Priority Date
CNN | Window | 80 | 1/10/2012
CarGroom | Air_conditioner | 60 | 1/10/2012
WaterTank | Air_Filter | 80 | 2/10/2012
Garage | Heating_Duct | 70 | 2/10/2012
Amazon | Heating_Duct | 100 | 3/10/2012

I have 2 tables:
1.) tblClient (CompanyID,Company_Name, Priority)
2.) tblServiceRequest (ServiceID, Type_Of_Equipment, Date)

I have tried many ways bu it doesn't work.
 
Welcome to the Forum,

Basically you can't sort by multiple fields in a query to the level you want, but you can within a Report, so I suggest you look to create a report from a query which shows your data and then in the design view of the Report look for Groups/Sorting and this should give you the result you want.
 
You still can in a query. Do the following:

1. Put the Date field before Priority
2. Untick the Show checkbox
3. Select an Ascending sort
4. Select a Descending sort for Priority
5. Add another instance of the Date field after the Priority field and make sure the Show box is ticked.
 
VbaInet:
You still can in a query. Do the following:

1. Put the Date field before Priority
2. Untick the Show checkbox
3. Select an Ascending sort
4. Select a Descending sort for Priority
5. Add another instance of the Date field after the Priority field and make sure the Show box is ticked.

It, worked thanks VbaInet


Trevor:

Welcome to the Forum,

Basically you can't sort by multiple fields in a query to the level you want, but you can within a Report, so I suggest you look to create a report from a query which shows your data and then in the design view of the Report look for Groups/Sorting and this should give you the result you want.

Thanks for the "Welcome" and pointer. The report type also works but I prefer VbaInet method. Either way, Thank you:)

By the way, is there a "Solve" function here?
 

Users who are viewing this thread

Back
Top Bottom