Assemble data from 3 tables and a form to a new record

DrPat

Registered User.
Local time
Today, 16:55
Joined
Feb 7, 2011
Messages
39
My DB tracks sponsors for a non-profit organization. Demographics, sponsorship levels, tickets to events, payments, members who recruited sponsors, etc.

I have a form EditSponsors which opens from a query that draws from 3 tables SponsorshipDemographics (PK SponsorID), SponsorshipLevels (PK SponsorLevelID)and Members (PK MemberID).

I have placed a command button on the form that opens a new form PostPayment which is intended to post a payment and make the necessary changes to the sponsor’s profile.

I want to load the new entered data form PostPayment with selected fields from EditSponsors, then create a new record in the table Payments that looks like this:
PaymentID (PK, Auto)
SponsorID
SponsorLevelID
MemberID
Check#, CheckDate, PostDate, Amount (data entry)

My Problem: The 3 PK’s from the other tables do not get entered into the new record in Payments.
Any suggestions?
 
You could put in the OnLoad event of your frmPostPayment, code to go to a new record and insert the values of the required fields, for example
Me.SponsorID= forms!frmEditSponsor!SponsorID
 

Users who are viewing this thread

Back
Top Bottom