Re: Editing Access Data
- From: "Jeff Boyce" <JeffBoyce_IF@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Dec 2005 05:51:19 -0800
So, you are saying that the [full name] field sometimes ends in a digit, but
that only happens when the phone number is added at the end of the field?
Is there any character (a colon, a semi-colon, a pair of dashes, ...) that
separates phone number form person name? If so, you could use the InStr()
function to locate that.
The basic approach is to first identify (ONLY) those records with a phone
number in them (see above), then run a query that returns a phone number
(and the [full name] & record ID) (see previous). Then you'd convert that
second query to an update query, and update both your phone field and your
person name field.
I suspect you'll want to break your [full name] field apart (for sorting by
last name, etc.), so why not combine that exercise with the "moving phone
numbers" exercise, and do it all?
P.S. This really depends on whether you have 5 rows like this or 5000 with
an embedded phone number. Just copy/paste in the former situation... <g>.
--
Regards
Jeff Boyce
<Office/Access MVP>
"fb" <fb@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0109AC65-D502-4A58-990F-2E0B6D5F4114@xxxxxxxxxxxxxxxx
> Hi:
>
> I have an Access Database with a 'full name' field. Unfortunately, the
> actual name (the data) is sometimes, also appended with a ten digit phone
> number. Thus I have, in the name field, "full name phone". Phone is always
a
> number. There is also another field called "phone" where the phone number
> should be placed.
>
> I would like to extrapulate the phone number from the name field and place
> it in the "phone" field, thus leaving the "name" field only with the full
> name and the "phone" field with the phone number.
>
> Any help how I can accomplish this, sample code would be appreciated.
Thanks
>
>
.
- Follow-Ups:
- Re: Editing Access Data
- From: fb
- Re: Editing Access Data
- Prev by Date: Counting returned rows
- Next by Date: Re: Editing Access Data
- Previous by thread: Counting returned rows
- Next by thread: Re: Editing Access Data
- Index(es):
Relevant Pages
|