Last item in Combo Box

S

Supe

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?
 
S

StrayBullet via AccessMonster.com

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.
 
F

fredg

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.
 
Top