Sorting

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?
 
M

Mike Painter

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
 
V

Van T. Dinh

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.
 

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