Thanks for the response, Pieter. I understand your answer but what I can't
figure out is how to insert another record by making a single pass at
processing the single record in tblWorking. I can not know at the time the
records are created just what the record ID is until the process is
completed. Ego, I can not add the second record because I don't know what the
parent (PK) record number is.
I thought maybe the use of a SubQuery might work. The primary query would
create the parent record AND the first trip record. Then use an immediate IF
to determine if the secord record is required. Would this work ?
"PieterLinden via AccessMonster.com" wrote:
> alhotch wrote:
> >I have a reservation application that I have obtained reservation data from
> >an email message (daqta from which is entered into the tblWorking table). The
> >email shows travel information either one-way or round trip. One way is
> >referenced by the literal "PRC-PHX". Round trip is referenced by the literal
> >"PRC-PHX-PRC". Depending on the O/W or R/T direction(s), I insert the number
> >one (1) for O/W or the number two (2) for R/T.
> >
> >The form used by the application has a main form (Reservations table) and an
> >embedded subform (ReservationDetails table). The main form has info like
> >Name, Phone, Email, etc. The subform contains the Full Name (Last, First),
> >PickUP Date, Location, Time, Type, Fare, etc. The "Type" field is the one
> >that gets the "1" or "2" - depending on O/W or R/T.
> >
> >One Way (O/W) works fine - Builds a record in the main form and a one line
> >record in the subform. The Reservations table has a one-to-many relationship
> >with the ReservationsDetail table. However, I need to append a second record
> >to the ReservationsDetail table (using the same AutoNumber generated
> >ReservationID record) when I attempt to add the other half of the round trip
> >travel - ie O/W makes one detail record, R/T needs to make two detail records.
> >
> >Below is the current "append" query I use to make the O/W record work. How
> >do I add the capablity to make two records in the same query to reflect
> >travel "out and back" (R/T) ?
> >
> just insert another record for the return trip, just reversing the origin and
> destination. Why do you need to make this so complicated? Keep it simple -
> it's easier to understand and debug.
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...eries/201005/1
>
> .
>