Change format of inherited data

D

Doug

How do I change a one field address into a three field address? Example:
Inherited format : 123 N Maple. Desired format Field one: 123 Field two:
N Field three: Maple.
 
J

John Vinson

How do I change a one field address into a three field address? Example:
Inherited format : 123 N Maple. Desired format Field one: 123 Field two:
N Field three: Maple.

This is not really a "format" question, but a data storage question...
and it's not an easy one unfortunately!

What about addresses like:

Ballacraine
31244 Circle Dr.
123 Maple Ave.
123 N. Maple Ave.
123 N. Maple
123 1/2 Main St.

It's tough to come up with an automated tool to RELIABLY determine
which text goes in which field!


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
B

Brendan Reynolds

You can use the InStr function to get the position of a character within a
string, and the Left$, Right$, and Mid$ functions to extract part of a
string. So for example (in the Immediate window) the following expression
returns everything up to but not including the first space ...

? left$("two words", instr("two words"," ")-1)
two

You can use expressions like these in an update query to update multiple
records. However, as John says elsewhere in this post, there are all kinds
of potential exceptions to the rule. A significant amount of manual checking
and error correction is likely to be required. Make a back up first, and
don't be in any hurry to delete the old field.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

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