I have three tables:
tPayments: PK is PaymentID, which is autoincrement
tDonations: PK is DonationID, which is autoincrement
tDonationsToPayments: PK is PaymentID + DonationID
A donation record will have one or more related payment records
A payment record will have zero or one related donation record
I have a main form based on tDonations, with a subform based on a query
pulling from tDonationsToPayments and tPayments
The donation record is created first, then the payment record(s). But in
order for the tDonationsToPayments table to be populated, both the DonationID
and the PaymentID have to already exist. The DonationID does already exist,
but the PaymentID does not, since the payment record hasn't been created yet.
Do I need to change the design of the query that underlies the subform? Do I
need to change the design of the main form? Do I need to run some VBA
procedure that first creates the payment record, then fills in the
Thanks for your help.