Sorting of text to number conversion

S

Sophia

Hi Everyone: I have a text that I am trying to convert to a number, so that
I can sort it numerically.

This is in the query:

No: Format(Val(nz([Pound_Sheet_No],0)),"0")

The problem is that it sorts as follows:

100
120
13
14
1400
15
150
16

Any suggestions to have it sort numerically?

Sophia
 
S

Sophia

Thanks. I did try that too. But I just realized that the problem was that
when I tried to sort by numbers under a certain number, I put quotes around
it....
eg <"50000" instead of <50000

Jerry Whittle said:
No: Val(nz([Pound_Sheet_No],0))
--
Jerry Whittle - MS Access MVP 2007 - 2009
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder

Sophia said:
Hi Everyone: I have a text that I am trying to convert to a number, so that
I can sort it numerically.

This is in the query:

No: Format(Val(nz([Pound_Sheet_No],0)),"0")

The problem is that it sorts as follows:

100
120
13
14
1400
15
150
16

Any suggestions to have it sort numerically?

Sophia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top