Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issues with sorting combo box on form

Status
Not open for further replies.

RanaH

Technical User
Feb 7, 2020
1
0
0
US
Currently the combo box is displaying the data sorted by Category ID and I need it to sort by Category. Below is my Query...

Select Top 1 "(All)" as Category, 0 as CategoryID from tlkCategory
ORDER BY tlkCategory.Category

UNION ALL SELECT tlkCategory.Category, tlkCategory.CategoryID
FROM tlkCategory;
 
What do you get when you do this:

[pre]
Select "(All)" as Category, 0 as CategoryID
from tlkCategory
UNION ALL
SELECT Category, CategoryID
FROM tlkCategory
ORDER BY 1
[/pre]


---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top