By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,631 Members | 1,423 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,631 IT Pros & Developers. It's quick & easy.

Alphebetize (sp?) A combo box

markmcgookin
Expert 100+
P: 648
Hi Folks,

I was wondering if anyone knew how to alphebetize the values in a combo box?

It is being populated by an SQL Query, however as the values that I am searching through are of type 'ntext' I can not do an ORDER BY in the statement (You can't do that on these values)

I was wondering if anyone had any code to sort a combo box into alphebetical order?

The combo box is called cboResults and has a bunch of text values in it.

e.g. cboResults.Text does return a valid string.

Thanks very much!
Mar 21 '07 #1
Share this Question
Share on Google+
3 Replies


P: 62
You can set combo box sorted property as true.
Mar 21 '07 #2

markmcgookin
Expert 100+
P: 648
You can set combo box sorted property as true.
Cheers bud,

I actually found a way to manipulate the data so I can use the ORDER BY statements, but thanks for the help.

I was able to convert the ntext to nchar(200) which can be searched.
Mar 21 '07 #3

devonknows
100+
P: 137
Cheers bud,

I actually found a way to manipulate the data so I can use the ORDER BY statements, but thanks for the help.

I was able to convert the ntext to nchar(200) which can be searched.
Was going to say that there is an ORDER BY clause you can use, you can use ORDER BY any field that is in the table that you are selecting from, name, address etc, i think if i remember correctly that the only one that it doesnt like too much is the DATE field that you can use on your tables.

Kind Regards
Devon.
Mar 21 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.