ordering numbers that r strings...

benwah

New member
Local time
Today, 10:13
Joined
Jul 25, 2001
Messages
8
Hi

I have a report that lists a series of numbers. Due to a problem that i wont go into here, i have had to convert those numbers to strings before placing them on the report. Now i have a new problem! It orders the numbers by the first digit. Thus i get something like:

1
10
11
12
13
3
33
4
41
46
48
6
7
8
82
etc...


Anyone know a way to get around this? Besides converting them back to numbers!

thanks in advance
wah
 
no that doesnt seem to work...
 
you can format the field: eg. Format([NumberText],"00"). now the 0's depends on how many digits your highest number has. if you only have <99 then "00", else if > 99 and < 999 then "000". so on and so fort, i know you get the point.
 
Thanks everyone for your help. It is now sorting in order. The numbers were originally an AutoNumber but I had problems displaying them. So I converted them to a string when I requested them in a query. Someone pointed out that I could just convert them to an int which worked. I thought an AutoNumber was basically an int except it produced consecutive unique numbers. Anyways it seems to be working fine now!

Thanks again
wah
 

Users who are viewing this thread

Back
Top Bottom