Sorting

  • Thread starter Thread starter Elspeth Carter
  • Start date Start date
E

Elspeth Carter

I'm wondering if you could shed some light.....I have a file which has
duplex numbering (ie. 106.1...106.2...106.15...106.23...106.3002.1...etc.)
I am trying to sort a file by the "code" but Access sorts the numbers 106.1,
106.1.2, 106.10, etc. is there a way around this?
 
Elspeth Carter said:
I'm wondering if you could shed some light.....I have a file which has
duplex numbering (ie. 106.1...106.2...106.15...106.23...106.3002.1...etc.)
I am trying to sort a file by the "code" but Access sorts the numbers 106.1,
106.1.2, 106.10, etc. is there a way around this?

An easy way is to add fields to contain the .x and .y parts of A.x.y
Another would be to mandate nnn.0001.0001
If these number are really necessary and the records are added sequentially
using an auto number and sorting on that and the first digits should work.
You can't have more than one period in a number field and access is sorting
the text values correctly
 
The behaviour you observe and the last posted "number" indicate that your
Field is a Text Field and therefore Access/JET sort your sequence as Text
rather than numerically (e.g. 102.10 is lower then 102.5).

If each part of the "number" has a separate meaning, you should store them
as separate Fields, not as one combined Field.
 
Back
Top