Sorting in Acces when

  • Thread starter Thread starter Bob Rupe
  • Start date Start date
B

Bob Rupe

Thanks for the help, but as you stated I do have trailing
characters so I cannot change it to numeric, and when I
do add the leading zero, it still does not put them in
correct order. For example, it goes 010, 0100,
0101...011, 0110 and so on. Do you know of any other way
to resolve this except to change it to numeric which
would be difficult.
Thanks,
Bob
-----Original Message-----
Can you open the table in design view, and change the
field from Text type to Number type? It will then sort
correctly as numeric values.

If you cannot do that because you have trailing
characters (e.g. 12c), then you need to enter leading
zeros to get the Text type to sort correctly.

Allen Browne - Microsoft MVP. Perth, Western Australia.


I have a quick question, I designed a Database that is
comprised of Title, Volume Number and Sequence Number.
when I try to do a sort on the three fields, it does
put the Title and Volume Numbe rin Order, but the Seuence
number does not go in order. For example, when I do
the sort, it goes 1, 10, 11, 12...19, 2, 20...29, 3, 30...
and so on. Is there anyway to get it to go in correct
sequential order? Any help would be appreciated.
Thanks, Bob
 
You can add a calculated field to your query and sort on it. Uncheck the "Show" box and it
won't be in the queries output, but will be sorted on.

Example:
Set the Field box in the query design grid to
SortOnMe:CInt([Table1].[Field1])
 
To sort numbers properly in a text field they must have the same number of
characters.
Change
010, 0100, 0101...011, 0110 to
0010,0100, 0101 ...0011 .. and they will sort properly.
0010, 0011,0100,0101
 
Back
Top