Append Data & Split Field into Three Fields

B

Barry McConomy

Hi

I want to append data from a table to another table, however, in Table1 the
telephone number (000) 111 2222 is in one field and in Table2 I want the
telephone number split in to 3 fields (with out the ( ) ), as follows:-

field1: 000
field2: 111
field3: 2222

Can somebody advise how I can do this.

Regards
Barry
 
M

Mike Painter

Barry said:
Hi

I want to append data from a table to another table, however, in
Table1 the telephone number (000) 111 2222 is in one field and in
Table2 I want the telephone number split in to 3 fields (with out the
( ) ), as follows:-
field1: 000
field2: 111
field3: 2222

Can somebody advise how I can do this.

You could use the mid function in an update query to place the values.

mid(OriginalField, 7,3) is 111 above.
mid(OriginalField,2,3) is 000

You could use these in a query as calculated fields so you could still use
the original number to dial from Access.

It would also be possible to write a little function using Split and Replace
to do the work.
If you are new to Access this would be a good place to learn a bit of
coding.
 
B

Barry McConomy

Mike

Thanks for the advice.

Regards
Barry

Mike Painter said:
You could use the mid function in an update query to place the values.

mid(OriginalField, 7,3) is 111 above.
mid(OriginalField,2,3) is 000

You could use these in a query as calculated fields so you could still use
the original number to dial from Access.

It would also be possible to write a little function using Split and
Replace to do the work.
If you are new to Access this would be a good place to learn a bit of
coding.
 

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