By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,562 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,562 IT Pros & Developers. It's quick & easy.

Append of Table And Sub-Table

P: n/a
sj
Situation:
I have 2 tables, parent table (Invoice) and child table
(InvoiceDetails) that is link by InvID in the child.

Requirement:
Need to do one-time append of information to another table of the
similar structure.

Problem:
When main table is append to the new table, it will bear a new ID.
Hence appending the child table with the old InvID is incorrect.

Question:
Is there an easier way to do it instead of writing SQL ? (didn't want
to spend too much time doing it as it is a one-time thing)

Please advise.

May 26 '07 #1
Share this Question
Share on Google+
2 Replies

P: n/a
sj wrote:
Situation:
I have 2 tables, parent table (Invoice) and child table
(InvoiceDetails) that is link by InvID in the child.

Requirement:
Need to do one-time append of information to another table of the
similar structure.

Problem:
When main table is append to the new table, it will bear a new ID.
Hence appending the child table with the old InvID is incorrect.
Why? Because you want it to or because you think it must? If the ID is an
AutoNumber and you include that field in the append then the rows will not
assigned a new ID value.
Question:
Is there an easier way to do it instead of writing SQL ? (didn't want
to spend too much time doing it as it is a one-time thing)
If the ID will be a new one then you will need to append the parent record
first, determine the new ID and then use that in the append for the details.
That would require the use of an append query, but not necessarily that you
write SQL. The query designer grid can easily handle that.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
May 26 '07 #2

P: n/a
sj
Seem like that's the only way. Thanks!

May 29 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.