Hello, I'm trying to open a form to a specific subform (from a completely different form). From frmOpenItems, I'm trying to open frmContractForm with the matching CustomerID and its subform, frmContractSub with the matching ContractID. Here is my code, but it's giving me an error:
Private Sub btnContract_Click()
'Open Contract Form
DoCmd.OpenForm "frmContractForm", , , "CustomerID=" & Me.CustomerID
DoCmd.GoToRecord "Forms!frmContractForm!frmContractSub.Form!ContractID=" & Me.ContractID
End Sub
How do I look for a specific subform once in the form I want?
Private Sub btnContract_Click()
'Open Contract Form
DoCmd.OpenForm "frmContractForm", , , "CustomerID=" & Me.CustomerID
DoCmd.GoToRecord "Forms!frmContractForm!frmContractSub.Form!ContractID=" & Me.ContractID
End Sub
How do I look for a specific subform once in the form I want?