label connected to control. how to detect? (1 Viewer)

Guus2005

AWF VIP
Local time
Today, 20:11
Joined
Jun 26, 2007
Messages
2,645
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!
 

Tieval

Still Clueless
Local time
Today, 19:11
Joined
Jun 26, 2015
Messages
475
Move the control, if a label is attached it will move with it.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 19:11
Joined
Feb 19, 2013
Messages
16,553
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

Top Bottom