Change a subform to a popup form

DrPat

Registered User.
Local time
Today, 03:46
Joined
Feb 7, 2011
Messages
39
My DB tracks sponsors for a non-profit.

On my edit sponsor form, I had a subform to enter payments. It worked well (with much help from the experts here). The master and child fields linked well and all the necessary data appended to a new record in the payments table.

Now to make it more user friendly, I changed the subform to a popup form (The 2 forms took up too much real estate on the screen).

I deleted the payments subform and created a command button to open the payments form as a popup.

I need 3 fields on the payments form to be populated from the edit sponsor form (sponsorID, MemberID, SponsorTypeID) and then payment details to be entered and posted to a new record in the payments table.

Problem: Since I've changed the payment form from a subform to a popup form, the master/child relationships are gone and the 3 fields I need for the payment record no longer appear.

I know I need a good lesson on filtering, but can anyone help with this specific problem in the meanwhile?

Thanks,
Pat
 
Use the Where Argument of the OpenForm method. Use VBA to read the values from the current record and construct the Where Clause.

A code free way is to put the subform into an empty popup main form and use the LinkFields. The MasterLinkFields don't have to be on the container form. They can be on an entirely different form referred to via the Forms collection.

The only difference is that the subform no longer tracks movements onthe original form as it would in a true subform construction but this is of course irrelevant in a popup scenario.

The borders, selectors etc can be turned off so that the subform looks like it is part of the main form.
 

Users who are viewing this thread

Back
Top Bottom