I have a form that is filtered BeforeUpdate by selecting a company on the primary form then passing the CompanyID to the form that opens.
This displays the selected company details along with a subform for clients against said company.
I am able to edit details for each customer but not the parent company. The form looks for OpenArgs in the BeforeUpdate event with the below code behind a button after selecting a company.
Private Sub cmdEdit_Click() 'Pull customer name for use in filter
Dim strCustomerID As String
If Not IsNull(Me.lstCompanies.Column(1)) Then
strCustomerID = Me.lstCompanies.Column(1)
DoCmd.OpenForm "frmCustomerSiteUpdate", acNormal, , "CustomerID=" & strCustomerID, , acWindowNormal, strCustomerID
I have allowed data edits in the second form fwiw.
Thanks a lot.