Subject Re: [IBO] TIBOQuery Sorting
Author Florian Hector

seems you are running into the same problems I did some time ago. I don't
know how much you know so far regarding the topic, therefore some basics:
Once you are done with defining your query using the component editor, click
on the tab Ordering, click on Create and select the columns you want your
query ordered by. Click OK and all the settings for OrderingItemNo,
OrderingItems, and OrderingLinks are automatically defined. Thing is,
ordering is only defined for one column at the time.
Using your fields IDNumber, FirstName, and LastName, the query would be
"Select IDNumber, FirstName, LastName from tabCustomers"
After the steps in paragraph 1, OrderingItems would look like this:


and Ordering Links like this:


Now, if you want to order by IDNumber, LastName, FirstName, you manually add
these two fields to the first row so that it looks like this:
IDNumber=IDNumber, LastName, FirstName

OrderingLinks remains as it is.

At runtime, you only have to set OrderingLinks to the desired value and the
query will be reorderd, e.g qryCustomers.OrderingLinks := 1

One more thing unrelated to your question. It would be nice if you provided
a real name, some people here on the list don't bother answering if they
have to deal with nameless people.