Activated by the SubF btn_Click event I am trying to open a childForm (not pictured) to a specific record using OpenArgs, from a field of the recordsource (not a control but a field which is not shown in the controls of the form). The form is based on a query (unsure if this makes a difference. Tried creating a demo file but was taking ages so hoping someone gets what I mean
. I'm pretty weak so bear with.
The btn_Onclick event fires in the subF, I need to get a value for the currentRecord [fieldName_FK] in the SubF of the where the cursor is in the recordset; so I thought:
Nope. Was trying to assign the openArg as an object variable also, & trying to assign a long variable type to the but no joy either. Been on it all day trying every permutation possible in my mind.

The btn_Onclick event fires in the subF, I need to get a value for the currentRecord [fieldName_FK] in the SubF of the where the cursor is in the recordset; so I thought:
Code:
Private Sub btnInSubF_Click()
Me.Parent.Form.CurrentRecord [FieldName_FK]
DoCmd.OpenForm "ChildFName", , , , , , Me.Parent.Form.Recordset.CurrentRecord[FieldName_FK]
End Sub
Nope. Was trying to assign the openArg as an object variable also, & trying to assign a long variable type to the but no joy either. Been on it all day trying every permutation possible in my mind.