dbTalk Databases Forums  

How do I copy data from one record into many

comp.database.ms-access comp.database.ms-access


Discuss How do I copy data from one record into many in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
LarryH
 
Posts: n/a

Default How do I copy data from one record into many - 01-01-2004 , 04:05 PM






I am new to Access and have one small problem I can't seem to solve. I have
a database with multiple order records for people. Each person has a unique
ID, and is on the datbase multiple times, but only one of each record has
the address, and phone, etc. I need to copy the data from that record into
all records with the same IDs.

I know I can creat multiple tables, but I need it in a single table so it
can be exported to a mailing/accounting program.

Any ideas would be appreciated.

LarryH



Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: How do I copy data from one record into many - 01-02-2004 , 10:41 AM






You will need to create 3 queries.
qryHasAddr
will return only those records with address, etc. Use: not is null
as the criteria

qryNoAddr
returns all other records. Use: is null

as the criteria.

Here is the fun one.
Create an update query using the the 2 queries above linked by ID.
Then pick the Addr field from qryNoAddr.
in the Updateto box put:
[qryHasAddr]![addr]

do the same for all the fields and run it.

I would make a backup copy of the table just in case!!!

If this makes no sense send me an e-mail and I'll send you a sample.

Good Luck
Ira Solomon



On Thu, 1 Jan 2004 15:05:56 -0700, "LarryH" <lhusband1 (AT) cox (DOT) net> wrote:

Quote:
I am new to Access and have one small problem I can't seem to solve. I have
a database with multiple order records for people. Each person has a unique
ID, and is on the datbase multiple times, but only one of each record has
the address, and phone, etc. I need to copy the data from that record into
all records with the same IDs.

I know I can creat multiple tables, but I need it in a single table so it
can be exported to a mailing/accounting program.

Any ideas would be appreciated.

LarryH



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.