Copy Primary Key from subform to subform

DavRob

New member
Local time
Tomorrow, 01:25
Joined
Oct 19, 2019
Messages
27
I have a main form "frmContactsNew" which has 2 subforms "frmCustomersSub" and "frmContactsNewSub"

"frmContactsNewCustSub" is the results of a search using the search as you type method

"frmContactsNewSub" has a record source of tblContacts

The objective is to search for a customer then add a new contact to that customer.

My problem is the PK, I can't get the "CustomersID" of the customers table to populate in the CustomersID field of "frmContactsNewSub"

I have tried multiple methods with no success
Such as =[Forms]![frmContactsNew]![frmContactsNewCustSub].[Form]![CustomersID]

Any advice is greatly appreciated

DavRob
 
i already showed you how to use Master/Child Link fields on the subform.
if you use this, the Primary Key of Parent form will automatically be
saved to the sub-form.
there is no need to add VBA or code.
 
you are correct I forgot to requery sorry
 

Users who are viewing this thread

Back
Top Bottom