A
alhotch
I have a database with two tables - tblOrders and tblOrderDetails.
Relationship of One (tblOrders) to-Many (tblOrderDetails) exists. tblOrders
has fldOrdersID as Primary Key and tblOrderDetails has fldOrdersID as Foreign
Key. As expected, the tblOrderDetails table can have more than one
corresponding record in the tblOrders table. I need to select records (based
on the fldOrdersID) from the tblOrders table AND "child" records from the
tblOrderDetails table to TWO NEW tables - I'll call them tblCulledOrders and
tblCulledOrderDetails. This means I get a copy of the selected records ONLY,
in the new tables.
I have created an Append Query that selects the desired record from
tblOrders and places it in the tblCulledOrders table. However, I do not get
the corresponding "child" record from tblOrderDetails table to be placed in
the tblCulledOrderDetails table. I'm not sure how to set up the queries and
relationships between (among ?) the two or four table to do this. Also, if
the tblOrderDetails table has more that one corresponding record to the
tblOrders table, Access appends two (or more) records to the tblCulledOrders
table after issuing a "key violation" message prior to performing the Append
Query operation.
Can this operation be done without writing any code (I quit writing code -
Fortran - years ago) ?
Relationship of One (tblOrders) to-Many (tblOrderDetails) exists. tblOrders
has fldOrdersID as Primary Key and tblOrderDetails has fldOrdersID as Foreign
Key. As expected, the tblOrderDetails table can have more than one
corresponding record in the tblOrders table. I need to select records (based
on the fldOrdersID) from the tblOrders table AND "child" records from the
tblOrderDetails table to TWO NEW tables - I'll call them tblCulledOrders and
tblCulledOrderDetails. This means I get a copy of the selected records ONLY,
in the new tables.
I have created an Append Query that selects the desired record from
tblOrders and places it in the tblCulledOrders table. However, I do not get
the corresponding "child" record from tblOrderDetails table to be placed in
the tblCulledOrderDetails table. I'm not sure how to set up the queries and
relationships between (among ?) the two or four table to do this. Also, if
the tblOrderDetails table has more that one corresponding record to the
tblOrders table, Access appends two (or more) records to the tblCulledOrders
table after issuing a "key violation" message prior to performing the Append
Query operation.
Can this operation be done without writing any code (I quit writing code -
Fortran - years ago) ?