astraltango
Programmer
I have a parent form that has a subform (subForm1) that opens a form (form1)
form1 then needs to reference subForm1
form1 is opened by multiple forms, so I can't hardcode the reference to subform1 in form1
I want to declare a public variable (callingFormVariable) in form1 (or as a global), that I then update with a reference to subform1 when subForm1 opens form1
I understand that I can't reference subform1 if I set callingFormVarible to the subform's name, ie:
callingFormVarible=Me.Name
as I need to reference subform1 through it's parent
if I have another public variable callingFormParentVariable, which I set to the name of the subform's parent form, I still can't reference subForm1 since I need the name of the subform control on the parent form
is there any way I can reference the name of this subform control from within subForm1, and what would the syntax be to reference this from Form1?
alternatively, is there an easier way to reference subForm1 through a direct reference variable? ie, instead of using the string name of the subform, can I declare callingFormVariable AS Form and set it as a reference to subForm1? if so, what would the syntax be to update callingFormVariable and what would the syntax be to use it to reference subForm1 from form1?
I hope I haven't confused you as much as I have myself
form1 then needs to reference subForm1
form1 is opened by multiple forms, so I can't hardcode the reference to subform1 in form1
I want to declare a public variable (callingFormVariable) in form1 (or as a global), that I then update with a reference to subform1 when subForm1 opens form1
I understand that I can't reference subform1 if I set callingFormVarible to the subform's name, ie:
callingFormVarible=Me.Name
as I need to reference subform1 through it's parent
if I have another public variable callingFormParentVariable, which I set to the name of the subform's parent form, I still can't reference subForm1 since I need the name of the subform control on the parent form
is there any way I can reference the name of this subform control from within subForm1, and what would the syntax be to reference this from Form1?
alternatively, is there an easier way to reference subForm1 through a direct reference variable? ie, instead of using the string name of the subform, can I declare callingFormVariable AS Form and set it as a reference to subForm1? if so, what would the syntax be to update callingFormVariable and what would the syntax be to use it to reference subForm1 from form1?
I hope I haven't confused you as much as I have myself
