Control name of subform from code behind subform 
Author Message
 Control name of subform from code behind subform

I have a main form (frmMain) on which there
is a control (ctlSub) that is a subform (sfrmSubForm).
Is there some way that I can determine, from the code
behind the subform, the name of the control ("ctlSub")
used on the main for.
Many thanks,
Roy


Sat, 24 Jan 2004 02:00:22 GMT  
 Control name of subform from code behind subform
strCtlName=Parent.ActiveControl.Name

--

~~~~~~~~~~~~~
Make a Great Day
TomG


Quote:
> I have a main form (frmMain) on which there
> is a control (ctlSub) that is a subform (sfrmSubForm).
> Is there some way that I can determine, from the code
> behind the subform, the name of the control ("ctlSub")
> used on the main for.
> Many thanks,
> Roy



Sat, 24 Jan 2004 02:33:17 GMT  
 Control name of subform from code behind subform
Tom,
Too obvious. Many thanks. I keep forgetting about ActiveControl !!!
Thanks,
Roy


Quote:
> strCtlName=Parent.ActiveControl.Name

> ~~~~~~~~~~~~~
> Make a Great Day
> TomG



> > I have a main form (frmMain) on which there
> > is a control (ctlSub) that is a subform (sfrmSubForm).
> > Is there some way that I can determine, from the code
> > behind the subform, the name of the control ("ctlSub")
> > used on the main for.
> > Many thanks,
> > Roy



Sat, 24 Jan 2004 07:58:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Referencing a field on a SubForm within a Subform

2. Question about the SubForm Object to help reference a subform

3. navigating for keyboard users - subfrom to form - subform to subform

4. Subform refresh moves last record to top of subform

5. tabbing from subform to subform

6. changing the sourceobject of subform when the form and subform are loaded

7. tabbing from subform to subform

8. Moving from a sub-subform to a subform in Access 2.0

9. Referencing object in form in code / Subform reference problem in code

10. Creating references to Controls ID's/Names in code behind pages

11. Code-behind file inheriting from another code-behind file

12. controlling a control on a subform

 

 
Powered by phpBB® Forum Software