label connected to control. how to detect?

Guus2005

AWF VIP
Local time
Today, 09:26
Joined
Jun 26, 2007
Messages
2,642
Simple question:

I have this label which is connected to a control.
When i hide the control, the label is also hidden.
Is there a way to see which label is connected to which control?

Thanks!
 
Move the control, if a label is attached it will move with it.
 
from a coding perspective you can reference the label's parent property to determine if it is linked to a control, or you can reference a controls control collection to determine if it has a label.

me.labelname.parent

me.controlname.controls(0).name

both will generate an error if there is not a control/label relationship (or one cannot exist - a label does not have a controls property for example) so if looping through the controls you will need error handling
 

Users who are viewing this thread

Back
Top Bottom