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

Problems with sorting on a report

Status
Not open for further replies.

gscma1

Technical User
Jun 27, 2006
94
GB
i have a report which list the codes we use along with the description.

The codes are basically the numbers 1 to 47 however there are some codes which have a letter after the number for example 26A. therefore the field is a text field.

When i sort my report into cost code order it seems to want to put anything with a 1 first, i.e. 1;1a;10;11;12;13-19 then its starts again with 2;20;21;22-29

Is there anyway i can get these codes to go in numerical order with the lettered codes in the correct place?

Many Thanks
 
Sort first by the expression:
=Val([CostCode])
then by
[CostCode]

Keep in mind this must be done in the report's sorting and grouping dialog.

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