Sorting the options within a combo box RRS feed

  • Question

  • I have a Table (tbl.Suppliers) and this contains SupplierNo, SupplierName, address and other info not related to this issue. I have created a List box from where i want to select a whole range of different information from different tables. Therefore I have built a query (qry_List) and based my List Box on that query. putting all the other information from the various other tables included in "qry_List" to one side for the moment, and just concentrating on the Suppliers information, I have included the fields "SupplierName" and "SupplierNo" from "tbl_Suppliers". In order to make a selection of the may records that are displayed in the List box, i have added a "Suppliers" Combo Box in order that I might filter out some of the other stuff. 

    Here is the nub of my problem. I have set the "Suppliers" Combo box to display Supplier Number and supplier Name with the "Bound" column being the supplier number. This works fine. HOEWEVER the original table contains records that are not in order and also there are some entries in the suppliers Table that don't have a supplier number. Sometimes I want to make a selection while only having the Supplier Number and sometimes I need to select while only having the Supplier Name.

    I am trying to find a way to have the Combo Box filter out and display only the records that have a Supplier Number in the Field (WEHERE SupplierNumber does not have an entry) and THEN I need to display all of the Supplier Numbers OR the Supplier Names AND have them displayed in EITHER Supplier Number OR Supplier Name ORDER (Ascending or Descending). I am currently trying to do this within the properties of the "Suppliers" Combo Box but I keep hitting problems.

    Does this make sense and could anyone help please?

    many thanks RayC

    Sunday, March 27, 2016 1:11 PM


All replies