The SupportNeedID could be written to a variable in the code that calls the OpenForm and passed to the intended control using OpenArgs, and the Form_load() event offrmSupportsSubform
1.) First, in whatever code you are using to open frmSupportsSubform,
*(I have assumed you are using a Command Button named "*cmdOpenSupportsSubform" on your main form "frmSupportArea") you
need to Dim a variable, and assign the value of SupportNeedID to it.
*** I just noticed that your code references "frmISPWriter" in the form hierarchy,
so I'm not quite sure now where this command button will reside?***
=====================================
Private Sub cmdOpenSupportsSubform_Click()
'This Procedure opens frmSupportsSubform in Data Entry and Dialog mode.
'The user adds the new item, closes the form, then returns to this main form
'to continue with the editing operation...
On Error GoTo Err_cmdOpenSupportsSubform_Click
Dim stDocName As String
Dim intSupportNeedID As Integer
intSupportNeedID = Forms!frmISPWriter!frmSupportArea.Form!frmSupportDescSubform.Form!SupportNeedID
stDocName = "frmSupportsSubform"
DoCmd.OpenForm "dlgAddNewPart", , , , acAdd, acDialog,
intSupportNeedID
Exit_cmdOpenSupportsSubform_Click:
Exit Sub
Err_cmdOpenSupportsSubform_Click:
MsgBox Err.Description
Resume Exit_cmdOpenSupportsSubform_Click
End Sub
==========================================
Now that we have set a value for the "intSupportNeedID" variable, the form will open an assign that value to the intended control.
Note that if the form is opened by any other method, the OpenArgs value will be Null, and the form will just open normally.
==========================================
Private Sub Form_Load()
' If form's OpenArgs property has a value, assign the contents
' of OpenArgs to the
SupportNeedID field. OpenArgs will contain
' a value ONLY if this form is opened using the cmdOpenSupportsSubform command button
' method with an OpenArgs argument.
If Not IsNull(Me.OpenArgs) Then
Me![SupportNeedID].SetFocus
Me![SupportNeedID] = Me.OpenArgs
End If
End Sub
==========================================
Give that a try and let us know if it works for you.