sorting problem

terrygefael

New member
Local time
Yesterday, 18:22
Joined
Jun 10, 2012
Messages
5
Hello folks!
I created a query to select only odd and even numbers using MOD 2 = 0 or 1 and it works fine. I set up this numeric field to sort ascending. But my sorting is wacko. Please help!

When I run the code, I get 1, 11, 12, 2, 20, 22, 3, and so on.
The same when I do the even sort, 2, 20, 22, 4, 46, 48, 6 and so on

Thanks in advance!
Terry:banghead:
 
It seems to be sorting in alphabetical order (so 100000000000 would come before 2, just as A is before B) rather than numerical order.

It looks like you have defined your datatype in the underlying table as Text rather than Number (maybe Text is the default so you just left it that way when you made the table).

Or something in the query/code (I'm not sure if you are running just a query or something in VBA) is converting numeric data to text data during the sort.
 

Users who are viewing this thread

Back
Top Bottom