Query sort on Yes/No field

utzja1

Registered User.
Local time
Today, 17:35
Joined
Oct 18, 2012
Messages
97
I have a query that pulls maintenance items for an individual asset, and one of the fields in the query is a Yes/No value. This field lets the client designate the maintenance item as Needed. The client wanted this so that when they complete the work, they can uncheck the box.

Unchecking the box removes it from the list of outstanding maintenance items on a given asset, but it keeps the maintenance item in the table so that the client can have a history of work requested and work performed. Tracking the outstanding work separately helps them to budget their maintenance monies.

When I execute the query, I want the checked (Needed) values to bubble to the top of the query results. I've tried ascending/descending sorts, but they still mix the checked/unchecked items together. Is there a way to do this, or is it better to group by the items Needed status?

Many thanks for your consideration.
 
It should work. Is there a field in the query grid to the left of that field that also has a sort specified? They are applied left to right.
 
Thanks for pointing out the obvious. I was sorting by the cost of each item and then by whether it was needed. Moving the Needed field to the left of the item cost in the query fixed it immediately.

Many thanks!
 

Users who are viewing this thread

Back
Top Bottom