PC Review


Reply
Thread Tools Rate Thread

Appending Records from Linked Tables to the *Real* Linked Tables

 
 
tbl
Guest
Posts: n/a
 
      20th Jun 2006
When dredging up older data from two tables that *should*
have been related but weren't, I've managed to get them
related, and spiffed up for appending to the linked tables
in my current db.

What I'm unsure about, is whether or not I need to do the
append in steps, or if I can do it all at once.

My level of expertise only allows the two step plan, where I
would append the main table data first, and then be able to
fetch the autonumbered Id field value (the new key) to
update in the child table (using the old keys), and then
append that one.

Is there anything better, short of pages of code that make
my hair catch fire?
--
Thanks,tbl
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      21st Jun 2006
Yes, it will be a 2-stage operation: appending the primary record first, so
you have the new primary key value, and then using that value for the
foreign key of the related table.

Since it sounds like this is a one-off operation, it is probably not worth
writing the code to automate this process.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"tbl" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When dredging up older data from two tables that *should*
> have been related but weren't, I've managed to get them
> related, and spiffed up for appending to the linked tables
> in my current db.
>
> What I'm unsure about, is whether or not I need to do the
> append in steps, or if I can do it all at once.
>
> My level of expertise only allows the two step plan, where I
> would append the main table data first, and then be able to
> fetch the autonumbered Id field value (the new key) to
> update in the child table (using the old keys), and then
> append that one.
>
> Is there anything better, short of pages of code that make
> my hair catch fire?
> --
> Thanks,tbl



 
Reply With Quote
 
tbl
Guest
Posts: n/a
 
      22nd Jun 2006
On Wed, 21 Jun 2006 15:21:44 +0800, "Allen Browne"
<(E-Mail Removed)> wrote:

>Yes, it will be a 2-stage operation: appending the primary record first, so
>you have the new primary key value, and then using that value for the
>foreign key of the related table.
>
>Since it sounds like this is a one-off operation, it is probably not worth
>writing the code to automate this process.



Thanks Allen. Backing up, gritting teeth, getting set. <g>
--
tbl
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Appending data to linked tables BobC Microsoft Access Getting Started 5 15th Oct 2009 04:48 AM
appending to multiple linked tables MTK Microsoft Access Queries 0 12th Feb 2009 08:29 PM
VBA Code - Records from linked tables and appending to unlinked table C. Pete Straman via AccessMonster.com Microsoft Access VBA Modules 1 18th Feb 2005 05:50 PM
VBA code for searching and appending data from linked tables to unlinked tables Pete Straman Straman via AccessMonster.com Microsoft Access External Data 1 17th Feb 2005 07:40 PM
Appending linked tables Rob Greatrex Microsoft Access External Data 5 25th Aug 2004 02:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:00 PM.