Hello again all,
I have a combo box Combo_PreviousOrders that gets its data from a query:
I have an option group on the same form that I would like to allow the user to select how to sort the combo box.
What do I need to enter in the query to get this to happen? I tried:
but it doesn't work.
Any ideas?
Thanks,
Jason
I have a combo box Combo_PreviousOrders that gets its data from a query:
Code:
SELECT qry_FirstOrderPartDescr.OrderID, qry_FirstOrderPartDescr.PONumber, qry_FirstOrderPartDescr.OrderType, qry_FirstOrderPartDescr.OrderDate, qry_FirstOrderPartDescr.Supplier, qry_FirstOrderPartDescr.Customer, qry_FirstOrderPartDescr.FirstOrderPart FROM qry_FirstOrderPartDescr ORDER BY [OrderID] DESC
I have an option group on the same form that I would like to allow the user to select how to sort the combo box.
What do I need to enter in the query to get this to happen? I tried:
Code:
SELECT qry_FirstOrderPartDescr.OrderID, qry_FirstOrderPartDescr.PONumber, qry_FirstOrderPartDescr.OrderType, qry_FirstOrderPartDescr.OrderDate, qry_FirstOrderPartDescr.Supplier, qry_FirstOrderPartDescr.Customer, qry_FirstOrderPartDescr.FirstOrderPart FROM qry_FirstOrderPartDescr ORDER BY IIF(Option_SortOrders=1,"qry_FirstOrderPartDescr.Supplier","qry_FirstOrderPartDescr.Customer") ASC, [OrderID] DESC
but it doesn't work.
Any ideas?
Thanks,
Jason