> I defined a view with an order by. The view is indeed sorted by > company_name, invoice_nb, however when I create a variable listbox based on > the view, it is no longer sorted and no other 'order by' makes it right
You have two issues: 1. Using a view in a listbox is not "remembering" the ORDER BY used in the definition of the view. I don't know if this is a bug or not (R:Base may have some other way of ordering the list box). FYI, the ability to use an ORDER BY clause at all in a view is an R:Base extension to SQL -- it's not supported in many other databases. 2. How to order the list box control the way you want. This is done in the listbox properties, by adding ORDER BY ColName1, ColName2 at the end of the WHERE clause in the Lookup Properties tab of the listbox. Changing the ORDER BY or ARRANGE BY clauses of the EDIT command will not affect the listbox order -- the view the listbox is based on is _not_ part of the dataset of the form. -- Larry
