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

Ascending sort not numerically correct 1

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Jul 20, 2004
337
US
I have a report that sorts on the employees number, the supervisors have a 2 digit number and the rest of the employees have a 3 digit employee. I have selected the sort to be ascending, however in the report, the 2 digit id numbers are at the bottom.. the 2 digit id's are in the 80's and 90's and the 3 digit numbers are in the 100 to 200 range. I need this to sort numerically correct. Is there code that will make this sort correctly?

Thanks for the help.
 
You can sort on a formatted fields:

Format(ID,"000")
 
Your report is sorting as you are asking. If you need the text values sorted as numeric, set the sorting and grouping expression to:
=Val([Employee Number])

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top