Hi,
I am inserting a subform (frm_switch) into many main forms (frm_main1, frm_main2, etc). Is there a way to reference the main form from the subform without using the name of each form?
I tried using Screen.ActiveForm in the code of the subform , but this just refers to the subform.
Dim testid as string
testid = Screen.ActiveForm!primkey
This does not get me the primkey for the main form, but tries to get the primkey for the subform (which is unbound).
Any ideas on how to do this?
(One alternative I came up with is to make a table (tbl_switch) which is linked to the primkey of the tables used by the main form, but was trying to avoid this.
Thanks.
I am inserting a subform (frm_switch) into many main forms (frm_main1, frm_main2, etc). Is there a way to reference the main form from the subform without using the name of each form?
I tried using Screen.ActiveForm in the code of the subform , but this just refers to the subform.
Dim testid as string
testid = Screen.ActiveForm!primkey
This does not get me the primkey for the main form, but tries to get the primkey for the subform (which is unbound).
Any ideas on how to do this?
(One alternative I came up with is to make a table (tbl_switch) which is linked to the primkey of the tables used by the main form, but was trying to avoid this.
Thanks.