Hello everyone, I'm trying to open one form from another. The problem is, from the first form, frmCustomer, I am creating a new record. When I click the button, the new form, frmContractsForm, opens, but to a new record. Since the parent form of frmContractsForm, I want it to open based on its primary key, CustomerID. Here is my code:
'Create Open Item for New Customer
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenForm "frmContractForm", , , "CustomerID=" & Me.CustomerID
I know it's a new record in frmCustomer, but I thought the acCmdSaveRecord would solve that problem. Thanks in advance!
'Create Open Item for New Customer
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenForm "frmContractForm", , , "CustomerID=" & Me.CustomerID
I know it's a new record in frmCustomer, but I thought the acCmdSaveRecord would solve that problem. Thanks in advance!