Sorting Street Name

Les

Registered User.
Local time
Today, 00:27
Joined
Nov 20, 2002
Messages
45
Can anyone tell me how to sort a field [address] by street name not by street number.

Is this possible?
 
Have the street number in a field, separate from Street name.

Alternatively, in a query sorting a street number street name field in a duplicate column, use the in str function to strip off the street number leaving the street name to be sorted. This of course assumes that the Strret Number will be numeric only, which I doubt will be the case. Some addresses don't have numbers and some are P.O. Boxes.

You could build a function to do your stripping if it gets too complicated becayse of number types or the lack thereof.

It seems to me that one would want to sort on street name after street number.
 
this seems to work:

IIf(InStr(InStr([address]," ")+1,[address]," ")<>0,Right([address],Len([address])-InStr(InStr([address],"")+1,[address]," ")),Right([address],Len([address])-InStr([address]," "))) AS SORTORD


ty,
=)
 
this works too.

name2 = "1234 Pheasant Street, Wherever CA 94587"
les22 = mid(name2,instr(1,name2," ")+1)
? les22
Pheasant Street, Wherever CA 94587
 

Users who are viewing this thread

Back
Top Bottom