How to sort fields when data type is memo?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eneyardi
    New Member
    • Jul 2010
    • 180

    #1

    How to sort fields when data type is memo?

    Is there anyway to sort fields which data type is memo, because unlike other data type can sort. Any suggestions are highly appreciated.
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    As far as I know your perfectly able to sort on memo fields. The main thing to be aware of is that Access will only base its sorting on the first 255 charecters of that memo field.

    Comment

    • eneyardi
      New Member
      • Jul 2010
      • 180

      #3
      In my table name tblARE, i have a field name Item, Description and Remarks. Both Item and Remarks data type is text are able to sort, but the description field set to memo cannot be sort. i don't know why it can't be sort.

      Comment

      • eneyardi
        New Member
        • Jul 2010
        • 180

        #4
        When i selectall the Description field, the sort button becomes disable, but when selectall the other fields that data type is text, the sort button is enable so that the sorting works. i don't know why is not working on memo field..

        Comment

        • TheSmileyCoder
          Recognized Expert Moderator Top Contributor
          • Dec 2009
          • 2322

          #5
          All I can tell you is that in Ac2003 working on a database in Ac2000 format, I can sort on my memo fields. What version of access are you using, and are your tables local, or linked, and if linked, what are they linked to?

          Comment

          • eneyardi
            New Member
            • Jul 2010
            • 180

            #6
            Access 2007

            Comment

            • eneyardi
              New Member
              • Jul 2010
              • 180

              #7
              My table are link to many form as queries. Only the field Description w/c data tape is memo is the only field that i can't sort, according to what i have researched before (sorting fields), is that the sorting process has a limited number of characters to be sorted. maybe that's why in memo field it cannot. Correct me TheSmileyCoder if I'm wrong..
              Last edited by Niheel; Mar 2 '11, 07:15 AM.

              Comment

              • TheSmileyCoder
                Recognized Expert Moderator Top Contributor
                • Dec 2009
                • 2322

                #8
                Hi eneyardi
                I managed to find a ac2007 to test on. You are correct that in table, query and form view, the built in accesss sort button gets disabled when switching to a memo type field. Why MS choose to do so I really don't know.

                That said you can still specify that you want to sort by that field in query design view, or even specify it at runtime in a form, by for example clicking on a label with appropriate code attached:
                Code:
                Me.OrderBy="[MyMemoField]"
                Me.OrderByOn=True
                You are correct that any sorting performed on a memo field will only base its sorting on the first 255 charecters.

                For clarification, the reason I asked about whether your tables were linked or not, waas that I was curious that your issue might be related to your database being linked to for instance an SQL server as opposed to internal access database. I didn't think that access would intentionallly disable the sort for memo fields.

                Comment

                Working...