Originally Posted by
June7
Okay, let's see if I get what you want. I was thinking only two independent forms involved but there are 3 forms of which 1 is a subform.
1. SelectEditCommitment opens AddCommitment to edit existing record and passes a value with OpenArgs
DoCmd.OpenForm "AddCommitmentDetail", , , "CommitmentID=" & Me.ListShowCommit.Column(3), , , "Edit"
2. Based on OpenArgs value modify labels on AddCommitment form and its subform, code in AddCommitment form. The If Then can't be a one-liner because you are doing more than one action (AND is not correct syntax). I should have seen this earlier.
If Me.OpenArgs = "Edit" Then
Me.Label49.Caption = "something"
Me.frmfacilitysub.Form.Label16.Caption = "something"
End If
This code works. I expect you want to display something other than 'something'.