Creating a new record in a table related to 2nd table via 3rd

Creating a new record in a table related to 2nd table via 3rd

Post by RGFubn » Sat, 01 Jan 2005 01:03:02


Kevin,

Your suggestion won't work, since there may be multiple related payment
records for a donation record.

A simpler solution is to make a foreign key in the tPayments table, called
DonationID. Except in this scenario, there would be many Payment records with
no DonationID.

The reason I created the tDonationsToPayments was to allow for multiple
payments related to one donation, but without any empty fields.

Does this make sense?

Thanks for the reply - any further help is appreciated.

Danny
 
 
 

Creating a new record in a table related to 2nd table via 3rd

Post by RGFubn » Sat, 01 Jan 2005 02:05:02

Hi Duane.

You're right - I have in fact changed the tDonationsToPayments table so that
the PaymentID is the primary key.

But aren't I still left with my "problem"? First, I created this "junction"
table to avoid the situation where the vast majority of Payment records will
have Null values in the DonationID field - since many payment records are not
donation payments, but for other things. So I have this junction table where
records are only created for donation payments.

My problem, given this table design, is that the Donation record and Payment
record both need to be created before the junction table can be filled in -
but it's the junction table that is the record source of the subform!

Should I just live with the empty DonationID fields in the tPayments table,
and get on with my life??

Thanks.

Danny

 
 
 

Creating a new record in a table related to 2nd table via 3rd

Post by Duane Hook » Sat, 01 Jan 2005 03:06:46

I would live with the empty field. You can still have a subform on your
Donation form that shows (and allows adding) payments made for the donation.
Is it possible for one check/payment to arrive that is applied to multiple
Donations/pledges?

--
Duane Hookom
MS Access MVP
 
 
 

Creating a new record in a table related to 2nd table via 3rd

Post by RGFubn » Sat, 01 Jan 2005 03:41:01

o, a check will not be applied to multiple donations. Donations-to-Payments
is a one-to-many relationship.

"Duane Hookom" wrote: