[AccessD] Sorting textual fields like number fields?

Gustav Brock gustav at cactus.dk
Tue Dec 2 12:49:06 CST 2003


Hi Christopher

You can use Val().

.. Order By Val([Address]), [Address] ..

/gustav


> All,

> I feel like I should already know how to do this, but for whatever
> reason - I don't.  Must be the pneumonia clouding my thinking. 
> Here's the problem:

> I need to sort an address field by street number.  The Address
> (street number and street name) is contained in a Text field, so my
> attempts to sort it end up with the numbers being sorted like text.
> For example, given addresses 1118 Main St., 1144 Maple St., 1146 Oak
> St., 113 East St. and 115 West St. the sort would look like this:

> 1118 Main St.
> 113 East St.
> 1144 Maple St.
> 1146 Oak St.
> 115 West St.

> I need the sort to go exactly by street number, like this:

> 113 East St.
> 115 West St.
> 1118 Main St.
> 1144 Maple St.
> 1146 Oak St.

> And I don't have a clue how to begin.  Heeeeeeeeeeeeeeeeeeeeeelp...

> -Christopher-



More information about the AccessD mailing list