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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Sort Order

Status
Not open for further replies.

zp162002

Programmer
Feb 3, 2003
39
US
I need to change the sort order of a query so letters sort after numbers. Any suggestions on how to do this? Thank you.
 
Well if you don't care if the Letters are sorted from Z-A instead of A-Z then you can sort them in descending order.

Regards,
gkprogrammer
 
Try this!

create a new column in your query expresion called

CharVal: IIF(ISNUMERIC([FieldName])=True, [FieldName,0)

Sort By this Column you will get your characters before the Numbers.
 
zevw,

That will force the numbered fields to be sorted on the bottom but it will leave all of the fields that begin with letters to be unsorted on top. Do you have a way to include a sort for these fields as well not just the numbered fields?

Regards,
gkprogrammer
 
Sort by the field CharVal First and then by the Column with characters second
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top