Need Help with Sorting Problem

margt_a

Registered User.
Local time
Today, 07:39
Joined
Aug 15, 2002
Messages
35
I have a list of projects on a report that I need to sort by project number. However, our project numbers are composed of a location number, then two numbers for the year, then three ascending numbers and a department letter (example: 602113E).

The question: How can I sort the report by the three ascending numbers in the Project Number (by the fourth, fifth and sixth digits?) I have the field formatted as text, and it is primary key to the projects table.

Any Suggestions? Thanks in advance!

Margt.
 
I assume the report is based on a query. Just add one more field to the query with its name like this.

MySort: mid([YouPrimaryKeyField],4,3)
Sort: Ascending

Then in your report, just sort it with MySort field.
 
It Worked!

Thank you, Tim K., It worked like a charm. I had to specify the table because of the nature of the query, so it looked like this : mid([tblProject.ProjectNumber],4,3). I applied the same to the Record Source query on my main projects form, and it worked there, too. Thanks!

:D Margaret
 

Users who are viewing this thread

Back
Top Bottom