A
alhotch
I think I know the answer: I want to Append "working" table fields to two
separate tables from a single Append Query. I believe the answer is NO. Can
only Append to one destination table.
So, having said that, what I want to do is this:
I have a csv file that is converted to the "working" table. Call it
tblWorking. This "working" table is deleted (data in the table) after each
Append so there are no records in tblWorking before the csv conversion. The
contents of tblWorking is information pertaining to a person's travel plans
(reservation type data). A portion of the info in tblWorking is to be
appended to tblReservations (name, phone, email, etc.). Other field data in
tblWorking is to be appended to tblReservationDetails (travel date, travel
time, PickUp/Drop Off Location, etc.).
When I append to tblReservations, I get a new record ID (ReservationID) -
tblReservations is linked to tblReservationDetails in a one-to-many
relationship. Once I create a new record in tblReservations and get the new
"ReservationID" autonumber value, I need to process the rest of tblWorking
fields to the associated (linked) tnlReservationDetails table.
What is the best sequence of events (queries) that I should run to "build"
(append) the new record in tblReservations; find the new ReservationID so I
can work with the "many" records aspect of the associated
tblReservationDetails table; and then append the remaining fields from
tblWorking to complete the process ? Keep in mind that I could have several
records in tblReservationDetails (due to round trips, several passengers on
the same reservation, etc.) which are associated with one tblReservation
record.
My FE database form for tblReservations uses a subform for
tblReservationDetails so the main reservation information is presented along
with the detail portion - in the subform.
Thanks for looking at this long question and helping me out.
Al
separate tables from a single Append Query. I believe the answer is NO. Can
only Append to one destination table.
So, having said that, what I want to do is this:
I have a csv file that is converted to the "working" table. Call it
tblWorking. This "working" table is deleted (data in the table) after each
Append so there are no records in tblWorking before the csv conversion. The
contents of tblWorking is information pertaining to a person's travel plans
(reservation type data). A portion of the info in tblWorking is to be
appended to tblReservations (name, phone, email, etc.). Other field data in
tblWorking is to be appended to tblReservationDetails (travel date, travel
time, PickUp/Drop Off Location, etc.).
When I append to tblReservations, I get a new record ID (ReservationID) -
tblReservations is linked to tblReservationDetails in a one-to-many
relationship. Once I create a new record in tblReservations and get the new
"ReservationID" autonumber value, I need to process the rest of tblWorking
fields to the associated (linked) tnlReservationDetails table.
What is the best sequence of events (queries) that I should run to "build"
(append) the new record in tblReservations; find the new ReservationID so I
can work with the "many" records aspect of the associated
tblReservationDetails table; and then append the remaining fields from
tblWorking to complete the process ? Keep in mind that I could have several
records in tblReservationDetails (due to round trips, several passengers on
the same reservation, etc.) which are associated with one tblReservation
record.
My FE database form for tblReservations uses a subform for
tblReservationDetails so the main reservation information is presented along
with the detail portion - in the subform.
Thanks for looking at this long question and helping me out.
Al