Last updated: 10 Nov 2002
Keith Seeley writes: Approach is resistant to sorting any field that is a memo field or references a memo field. However, there is one way to get the first 23 characters into a calculated field that can be sorted (more than 23 if you want to add additional calculated fields).
You need to convince Approach that it's not dealing with a memo field by converting each of the first 23 characters in the memo field to it's ASCII value, then converting it back to a character and combining as you go along.
Define two calc fields, SortableMemo and SM, and sort on SortableMemo. All you need to do is simply change "YourMemoFieldHere" in the SM formula to the name of your memo field.
SM = Left(YourMemoFieldHere, 23)
SortableMemo =
Combine(Chr(Asc(Middle(SM, 1, 1))), Chr(Asc(Middle(SM, 2, 1))), Chr(Asc(Middle(SM, 3, 1))), Chr(Asc(Middle(SM, 4, 1))), Chr(Asc(Middle(SM, 5, 1))), Chr(Asc(Middle(SM, 6, 1))), Chr(Asc(Middle(SM, 7, 1))), Chr(Asc(Middle(SM, 8, 1))), Chr(Asc(Middle(SM, 9, 1))), Chr(Asc(Middle(SM, 10, 1))), Chr(Asc(Middle(SM, 11, 1))), Chr(Asc(Middle(SM, 12, 1))), Chr(Asc(Middle(SM, 13, 1))), Chr(Asc(Middle(SM, 14, 1))), Chr(Asc(Middle(SM, 15, 1))), Chr(Asc(Middle(SM, 16, 1))), Chr(Asc(Middle(SM, 17, 1))), Chr(Asc(Middle(SM, 18, 1))), Chr(Asc(Middle(SM, 19, 1))), Chr(Asc(Middle(SM, 20, 1))), Chr(Asc(Middle(SM, 21, 1))), Chr(Asc(Middle(SM, 22, 1))), Chr(Asc(Middle(SM, 23, 1))))