Move selected to top of list in listbox

oxicottin

Learning by pecking away....
Local time
Today, 11:43
Joined
Jun 26, 2007
Messages
891
Hello, I have a multiselect listbox and I want to move each item selected to the top of the list in the listbox so they are not all scattered in my listbox. How is this done?

Thanks,
 
What is your row source type? If value list, you could adjust it to put the selected items in front. If query, try applying a sort order, if possible.
 
My row source type is Table/Query

SELECT tbl_Employees.EmployeeID, [EmpFName] & " " & [EmpLName] AS EmployeeName, (Left([EmpFName],1)) & (Left([EmpLName],1)) AS Initals, tbl_Employees.IsInactive, tbl_Employees.EmpLName FROM tbl_Employees WHERE (((tbl_Employees.IsInactive)=False)) ORDER BY tbl_Employees.IsInactive DESC , tbl_Employees.EmpLName;
 
Check the Similar Threads at bottom of the page
 
My row source type is Table/Query
You could add another field to indicate if the record was selected and then include that in your ORDER BY clause. A better idea might be is to use two listboxes and simply transfer the selected items to the second listbox.
 
I tried a different work around, i used a query of the selected names to show in a list.
 
I tried a different work around, i used a query of the selected names to show in a list.
Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom