View Full Version : Sorting by ignoring × and +


Gen
01-28-2007, 12:52 AM
I have a table of plant names such as

×Mahoberberis
+Crataegomespilus
Iris
Scilla
Hebe
Geranium
Acorus

Note that the multiplication and plus signs are part of the names.

If I sort the table (A-Z) I get

+Crataegomespilus
×Mahoberberis
Acorus
Geranium
Hebe
Iris
Scilla

What I would like to see is

Acorus
+Crataegomespilus
Geranium
Hebe
Iris
×Mahoberberis
Scilla

I am not a programmer so need to be led by the hand, but can anyone see a way of achieving this which I could copy? My simple mind tells me that I have somehow to suppress the × and + during the sort. But how?

RuralGuy
01-28-2007, 04:53 AM
Are + and x the *only* two chacacters that need to be ignored?

Gen
01-28-2007, 05:19 AM
Are + and x the *only* two chacacters that need to be ignored?

Yes these are the only two characters which need to be considered. The × should be a multiplication sign (Alt 0215) not a lower case 'x'.

RuralGuy
01-28-2007, 05:46 AM
Try creating another field in your query like:
SortField: IIf((Asc([YourFieldName])>123) Or (Asc([YourFieldName])<65),Mid([YourFieldName],2),[YourFieldName])
...using your field name of course and then sort on this field rather than the other field.

Edit: Should eliminate *any* non alpha character as the 1st character!