Alphabetizing street names with numbers in the way

G

George Reamy

I figure I can't do this, but I thought I'd ask:

I have a political database with street address info
appearing in one field like this: "705 Palm Ave." I need
to add the precinct number for hundreds of records, and
it would go a lot more quickly if I could alphabetize by
street name, since my precinct reference is organized
that way. Is there a way to get Access to ignore the
numbers so I can order the field/records by street?

Thanks.

--George Reamy
 
C

Cheryl Fischer

You could try something like the following in a Query:

StreetOnly: Mid([Address], InStr([Address], " ") + 1)

Add this calculated field to a query and select Sort Ascending.

The expression works for addresses which begin with a number and have the
Street name immediately after the number, as in the example you provided:
705 Palm Ave.
 
S

Susan Kennedy

George,

Can you say that the name of the street almost always
starts after the first space? If so, you can add to a
query a formula like:

Mid([address],InStr([address]," ")+1)

which will grab the part of the address field after the
space. Then you can sort on the formula.

Susan
 
C

Cheryl Fischer

You're welcome!

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Jim/Chris said:
Thanks Cheryl. That will be very usefull to me

Jim
-----Original Message-----
You could try something like the following in a Query:

StreetOnly: Mid([Address], InStr([Address], " ") + 1)

Add this calculated field to a query and select Sort Ascending.

The expression works for addresses which begin with a number and have the
Street name immediately after the number, as in the example you provided:
705 Palm Ave.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George Reamy said:
I figure I can't do this, but I thought I'd ask:

I have a political database with street address info
appearing in one field like this: "705 Palm Ave." I need
to add the precinct number for hundreds of records, and
it would go a lot more quickly if I could alphabetize by
street name, since my precinct reference is organized
that way. Is there a way to get Access to ignore the
numbers so I can order the field/records by street?

Thanks.

--George Reamy


.
 
G

George Reamy

Thanks! I'll give it a shot. --George
-----Original Message-----
George,

Can you say that the name of the street almost always
starts after the first space? If so, you can add to a
query a formula like:

Mid([address],InStr([address]," ")+1)

which will grab the part of the address field after the
space. Then you can sort on the formula.

Susan
-----Original Message-----
I figure I can't do this, but I thought I'd ask:

I have a political database with street address info
appearing in one field like this: "705 Palm Ave." I need
to add the precinct number for hundreds of records, and
it would go a lot more quickly if I could alphabetize by
street name, since my precinct reference is organized
that way. Is there a way to get Access to ignore the
numbers so I can order the field/records by street?

Thanks.

--George Reamy
.
.
 
G

George Reamy

You're a life-saver, Cheryl! --George
-----Original Message-----
You could try something like the following in a Query:

StreetOnly: Mid([Address], InStr([Address], " ") + 1)

Add this calculated field to a query and select Sort Ascending.

The expression works for addresses which begin with a number and have the
Street name immediately after the number, as in the example you provided:
705 Palm Ave.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George Reamy said:
I figure I can't do this, but I thought I'd ask:

I have a political database with street address info
appearing in one field like this: "705 Palm Ave." I need
to add the precinct number for hundreds of records, and
it would go a lot more quickly if I could alphabetize by
street name, since my precinct reference is organized
that way. Is there a way to get Access to ignore the
numbers so I can order the field/records by street?

Thanks.

--George Reamy


.
 
C

Cheryl Fischer

Thank you, George. Good luck with your project.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George Reamy said:
You're a life-saver, Cheryl! --George
-----Original Message-----
You could try something like the following in a Query:

StreetOnly: Mid([Address], InStr([Address], " ") + 1)

Add this calculated field to a query and select Sort Ascending.

The expression works for addresses which begin with a number and have the
Street name immediately after the number, as in the example you provided:
705 Palm Ave.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

George Reamy said:
I figure I can't do this, but I thought I'd ask:

I have a political database with street address info
appearing in one field like this: "705 Palm Ave." I need
to add the precinct number for hundreds of records, and
it would go a lot more quickly if I could alphabetize by
street name, since my precinct reference is organized
that way. Is there a way to get Access to ignore the
numbers so I can order the field/records by street?

Thanks.

--George Reamy


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top