Last item in Combo Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box where you can select the employee assigned to a project.
In the combo box there is also a "Not Assigned to Company" optin that can be
selected. Is there a way to sort by employee, but also have this "Not
Assigned to Company" as the last item listed on the drop down list even
though it not last if put in Ascending order?
 
I've done this by adding a numeric Sort column to the combox's source table
and using that in the order by portion of the combox row source.
 
I've done this by adding a numeric Sort column to the combox's source table
and using that in the order by portion of the combox row source.

How about placing it first in the list?

Select TableName.EmpID, TableName.EmployeeName from TableName UNION
Select Null, "<Not Assigned to Company>" from TableName
ORDER BY TableName.EmployeeName;

If you absolutely needed it last you can place a Z in front of the
text, "ZNot Assigned ..." and hope there isn't an employee named
"Zygmond", in which case use 2 Z's.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top