How do i get database table of addys to sort by particular states

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a data base table with names and addresses to mail to - I would
like to sort out only 4 states out of the 30 I have - can someone help
me?Thanks in advance!
 
In your criteria under the state field put something like...

="TX" or "OK" or "AZ" or "LA"

(of course you will use the appropriate states.)
 
I created a data base table with names and addresses to mail to - I would
like to sort out only 4 states out of the 30 I have - can someone help
me?Thanks in advance!

How are you storing the state? Do you have a separate State field
(good) or are you storing the address all in one field like "123 Maple
St., Anytown NY"?

If (as you should) the state is in a separate field, you can use a
Query with a criterion

IN ("ME", "VT", "NH", "MA")

to get those four states.

If you have the address all in one field, AND if you are *CONSISTANT*
at having the state code as two letters, last in the field, you can
use

LIKE "*ME" OR LIKE "*VT" OR LIKE "*NH" OR LIKE "*MA"

as a criterion.

If the state is embedded within the string, sometimes followed by a
zip code, sometimes not, sometimes stored as the two letter code and
sometimes as the state name or a longer abbreviation... you need to
redesign your database.

John W. Vinson[MVP]
 

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

Back
Top