Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Why is record in combobox not alphabetically arranged?

Why is record in combobox not alphabetically arranged?

Why is record in combobox not alphabetically arranged?

Hi everyone... i have these code in Load procedure....

SELECT PADR(ALLTRIM(UPPER(sname)) + ", " + ALLTRIM(fname),25), idnum FROM tsulat ORDER BY sname, fname INTO CURSOR PgBseCbo

my question is, why is it not showing alpabetically in the dropdown list, not all but some of the record are not in proper order? did i miss something? Thanks and God bless...

RE: Why is record in combobox not alphabetically arranged?

Sorting by collation sequence MACHINE is the usuual sorting, unless you defined special collations for fields. It sorts English okay, may only fail on some special characters with diacritics or umlauts, for example. Most likely, you also get Names starting with lowercase letters after names starting with uppercase letters, as 'a' has a byte value of 97 while 'Z' has 90. So all lowercase letter are sorted after all uppercase letters, too, even when you only use the English/Latin 26 letters without any accents, etc.


RE: Why is record in combobox not alphabetically arranged?

Just to follow up Chris's reply, you might need to issue a SET COLLATE command immediately before the SELECT. For example, if you have Spanish names in the table, and the names might include characters such as Ñ or any accented letter, then you should do SET COLLATE TO "SPANISH".


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Why is record in combobox not alphabetically arranged?

Thank you Mike, Chris, Mj for always helping.. God bless....

Ok I'll Try putting collate... Thanks again...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close