Do you really want the apartment number formatted differently if it is
followed by a street name, or was that a typo? In my experience, a street
name is normally preceded by a number -- is that not the case with your
addresses? Is it the case with _some_ of them? If there is an apartment
number, is it always in the form APTnX where n is a number and X is
alphabetic? Can n be more than one digit? Can X be more than one letter?
And given that you give only two examples, in which the only reformatting
appears to be of the representation of the apartment number, then refer to
many other examples, some of which do not have an apartment number, it is
very difficult for me to understand exactly what it is that you want to
accomplish. Could you clarify? If you can, perhaps someone can make a
useful suggestion.
The problem most of us have with trying to standardize addresses is that
real-world addresses are not "standard" -- they come in many forms, with
variations that are acceptable in many uses (e.g., delivering letters or
packages). What often results is a long list of conditions to determine the
original format, and a long set of special cases to re-format them.
Larry Linson
Microsoft Access MVP
<mi*************@gmail.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
>I have an address field of 60000+ that I am trying to clean. One thing
I am trying to do is take every apartment number and make it more
standard. Here is my question:
How do I take a record like "NORTHGATE APT5C" and another record like
"NORTHGATE APT5C WESTWOOD AVE" and make them look like:
"NORTHGATE APT 5C" and "NORTHGATE APT5 C WESTWOOD AVE"
I have many different examples, and they don't all have Apt in them. I
figured out how to find them all, using:
Like "*#[a-z]* or Like "*[a-z]#*"
but I don't know how to add a space between them. this is basically an
advanced find/replace, and I'm pretty sure I can do it, but I'm not
sure how to create the update query.
Thanks,
Michael