A
alhotch
Sorry for the delay, John.
I have been working on an email/spam issue all weekend and have not yet had
time to "get back to my append". Will be working on it tomorrow morning.
By the by, when the reservationist in the office "makes" a reservation,
using the Reservations form (which adds info to the Reservations table), they
key in (and in this order) FirstName, LastName, PhoneNumber. This is the name
of the caller making the reservation. Once these three fields are entered,
the reservationist moves on to the ReservationDetails subform where the
"concatenated" LastName, FirstName is automatically entered into a field
named FullName. The next fields are DateTaken, Direction
(Northbound/Southbound), PickUP Location, DropOff Location, Time, Type of
Trip (R/T, O/W, Child under 12, etc.), Fare, AmtDue, and finally
Notes/Comments. Then it's back to the Reservations form (bottom half fo the
screen) to calculate the Total Fare, enter any credit card info (if not a
cash transaction), and name of the reservationist making the reservation.
Here's why I need the FullName in ReservationDetails table. Even though John
Smith "makes" the reservation, passengers travelling with him could have
LastName, FirstName of Jane Smith (wife), and Sam Smith (child). These three
names will be automatically listed on the ReservationDetails subform
(FullName), inserted into ReservationDetails.FullName, and when printed, will
appear on the driver's travel manifest. The driver needs to know the names of
passengers and if they owe any money. The "system" counts these three names
as three passengers. It is also quite common for a Jane Smith to "make" the
reservation and have a travelling companion by the name of Joe Brown. Jane
Smith's name is in the Reservations table. She and Joe Brown's names will be
in th ReservationDetails table in the FullName field (separate
ReservationDetails records). So you can see I can have several detail records
(ReservationDetails table) for each main (Reservations table) record.
Sorry for the long explanation as to "Why FullName ?". I'll keep you posted
on my progress ...
Al
I have been working on an email/spam issue all weekend and have not yet had
time to "get back to my append". Will be working on it tomorrow morning.
By the by, when the reservationist in the office "makes" a reservation,
using the Reservations form (which adds info to the Reservations table), they
key in (and in this order) FirstName, LastName, PhoneNumber. This is the name
of the caller making the reservation. Once these three fields are entered,
the reservationist moves on to the ReservationDetails subform where the
"concatenated" LastName, FirstName is automatically entered into a field
named FullName. The next fields are DateTaken, Direction
(Northbound/Southbound), PickUP Location, DropOff Location, Time, Type of
Trip (R/T, O/W, Child under 12, etc.), Fare, AmtDue, and finally
Notes/Comments. Then it's back to the Reservations form (bottom half fo the
screen) to calculate the Total Fare, enter any credit card info (if not a
cash transaction), and name of the reservationist making the reservation.
Here's why I need the FullName in ReservationDetails table. Even though John
Smith "makes" the reservation, passengers travelling with him could have
LastName, FirstName of Jane Smith (wife), and Sam Smith (child). These three
names will be automatically listed on the ReservationDetails subform
(FullName), inserted into ReservationDetails.FullName, and when printed, will
appear on the driver's travel manifest. The driver needs to know the names of
passengers and if they owe any money. The "system" counts these three names
as three passengers. It is also quite common for a Jane Smith to "make" the
reservation and have a travelling companion by the name of Joe Brown. Jane
Smith's name is in the Reservations table. She and Joe Brown's names will be
in th ReservationDetails table in the FullName field (separate
ReservationDetails records). So you can see I can have several detail records
(ReservationDetails table) for each main (Reservations table) record.
Sorry for the long explanation as to "Why FullName ?". I'll keep you posted
on my progress ...
Al
John W. Vinson said:Thanks for you prompt response, John.
Fullname IS required as my FE database consists of a frmReservations which
contains FirstName, LastName, PhoneNumber, FareDue, PaymentMethod,
CreditCardNo, TakenBy, and Agent.
In the middle of this FE database form is frmReservationDetails subform
which contains Fullname, TravelDate, Direction(North/South), PULocation,
DOLocation, Time, Type, Fare, Due, and Note fields. Fullname is necessary in
the subform. I guess it could be "computed" at some other point in the
process. I just felt it was easier to do it during the original append.
FullName (LastName, FirstName concatenation) gets plugged into the
ReserfvationDetails table, NEVER in the Reservations table.
Don't confuse data STORAGE with data DISPLAY.
Sure, it's necessary to have fullname on your forms and reports. But it is
*not* necessary to store it in the ReservationDetails table in order to do
so!!!
You can have a textbox (on the mainform or the subform) with a control source
=[FirstName] & " " & [LastName]
to dynamically, automatically, effortlessly derive the fullname.
Reservations.ReservationID is the PK and an Autonumber in table
Reservations. ReservationDetails.ResDetailID is a PK in table
ReservationDetails. Reservations.ReservationID is a FK in ReservationDetails
and is linked from Reservations in a one-to-many relationship. One
Reservation can have Many ReservationDetails. It is the RerservationDetails
fields that populate the subform.
Unless one Reservation can have many ReservationDetails, and those
ReservationDetails have DIFFERENT fullname values (which would be very odd to
my mind), I'll stick by my guns.
So, I can, and have, sucessfully appended selected fields from tblWorking to
table Reservations. But when I do this, I need Access to create an entry in
ReservationDetails that links back to Reservations. With AutoNumber on in
both PKs of Reservations AND ReservationDetails, I need to be sure that even
if I only append fields from tblWorking into table Reservations, a "linked"
entry in table ReservationDetails is created, even if it was empty of any
data. I could always process another query later on to fill in the fields of
table ReservationDetails that are pertinent to it's "parent" record in table
Reservations. I thought I could do this in one append query.
You don't need to include the ResDetailID in the append query, it will
increment automatically.
This "reservation system" has been running for over ten years. I am now
adding the capability to "parse" email reservations into a "csv" file (as
opposed to directly into the DB), and create tblWorking fields from Access
processing of the csv file. A single email contains names, amounts, email
addresses, pickup/dropoff locations, times and dates of travel, etc. From one
email, I have to get the information into both tables - Reservations and
ReservationDetails - from tblWorking.
My suggested query should do that. Try it. If it doesn't please post details
of the manner in which it fails.