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

ordering numbers that strings 2

Status
Not open for further replies.

benwah

Technical User
Jun 27, 2001
97
GB
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
 
Use an expression in your query instead of the actual field:

IntNumber: = Int([Your field])
 
thanks Cosmo but thats kinda what i have already done. That is how i converted the number to a string.

ie Exp1: Str$([refnum])

i'll try your code but i think that will lead me back to my orig problem... I'll let you know.

thanks
wah
 
HA! wadda ya know it worked! I was almost on the right track! Thanks Cosmo.
 
Ben:

Try using the Val function:

Number: Val([RecNum])

in the query.

This will treat whatever is in the text field as a number.

I just tested it and it seems to work OK.

Larry De Laruelle
larry1de@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top