How use LinkChildFields and LinkMasterFields with code?
I have in the main form the primary key IDRecord, and would link it Key with the child field by code.
I tried this in my main form:
Private Sub Form_Current()
Me.MySubForm.LinkChildFields = Me.IDRecord
Me.MySubForm.LinkMasterFields = Me.IDRecord
End Sub
Ps.:
My form is not linked in the table. I use code to get the records.
In MySubForm I don't have any reference to my main form.
Luthius
I have in the main form the primary key IDRecord, and would link it Key with the child field by code.
I tried this in my main form:
Private Sub Form_Current()
Me.MySubForm.LinkChildFields = Me.IDRecord
Me.MySubForm.LinkMasterFields = Me.IDRecord
End Sub
Ps.:
My form is not linked in the table. I use code to get the records.
In MySubForm I don't have any reference to my main form.
Luthius