Share via

Sorting a numeric column offers sorting from A to Z, rather than Smallest to Largest. Why?

Anonymous
2021-06-24T17:16:48+00:00

I have an existing column in Access that is numbers. I added a row and for some reason the value that was set on one of columns was changed, as now when I click to sort from largest to smallest, etc., it now has only sorting A to Z, but there are no letters in that column. How do I change it back so that it will allow me to sort largest to smallest and smallest to largest.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

7 answers

Sort by: Most helpful
  1. George Hepworth 22,855 Reputation points Volunteer Moderator
    2021-06-25T03:02:24+00:00

    It depends in part on the data now in the field, but you should be able to open the table in design view and change it in the property sheet. If there are no non-digit values in the field, Access should accept the change.

    That said, create a backup copy of the table first. Then make the datatype change on that backup to be sure it will work without errors or other problems.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2021-06-24T21:43:20+00:00

    yes I believe that is what happened. I am really not familiar with this program. Do you know the steps to change it back to a number datatype?   Thank you for your assistance. You definitely know your way around a computer :-)

    Was this answer helpful?

    0 comments No comments
  3. George Hepworth 22,855 Reputation points Volunteer Moderator
    2021-06-24T19:39:03+00:00

    I see. Well, I suspect that the ability to sort "A-Z" should produce the same results as the ability to sort "Smallest to Largest" in that both refer to the same concept if these were actually numbers, and not just a set of digits.

    However, the problem seems to be that the underlying DataType in the field called Open is NOT numbers, but text, perhaps Short Text.

    Note that the values in Open are left aligned (the way text is aligned) whereas the values in Closed are right aligned (the way numbers are aligned).

    That suggests to me that "somehow", the datatype was changed from a number datatype (integer, long integer, etc.) to a string or text datatype.

    I can only guess that when you "added a row" that also involved the datatype change in some way. Change it back to the appropriate number datatype and you should be good to go.

    By the way, because of issues like this, I tend to use the term "digits" not "numbers" in describing the actual values because a text string can consist entirely of digits which are not numeric in the same sense that actual numbers are. For example, you cannot add two phone numbers together and come up with a meaningful result (555-232-5555 + 666-323-5555 makes no sense at all). Of course, you can add 10 dollars and 20 dollars and come up with 30 dollars because THOSE digits are in fact numbers. Does that make sense?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2021-06-24T18:48:56+00:00

    So the column below "Open" is what changed from being able to sort "smallest to largest" and "largest to smallest"  As you can see it now only gives the option of sorting "A to Z" and "Z" to "A" . Note: This "Open" column only contains numbers no letters.  

    Was this answer helpful?

    0 comments No comments
  5. George Hepworth 22,855 Reputation points Volunteer Moderator
    2021-06-24T17:22:58+00:00

    Sometimes a picture really is worth a thousand words.
    Can you provide a screenshot to illustrate?

    And when you say the existing field is "numbers", I assume that means the datatype for that field is either an integer, long integer or other number datatype, correct?

    Also, what does it mean to say that "...the value  was set on one of columns was changed..."? Are we talking about two different fields?

    Was this answer helpful?

    0 comments No comments