Thank you for your support!    
UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Edit Discussion
> Reference a control's label    

Reference a control's label

If you look at the member's of an Access.Control object in the Object Browser you will see that all controls have a Controls property.
Access controls that have a label attached to them will have one item in the Controls collection. That item, .Item(0), will be the label object
that is attached to the control.

Proof of concept

Dim lbl as Access.Label
Set lbl = ControlName.Controls.Item(0)

Debug.Print lbl.Caption

Caveat

If a control does not have an attached label, referencing .Controls.Item(0) will throw an error.

Edit Discussion
This page was last modified 11:39, 14 February 2012.  This page has been accessed 956 times.  Disclaimers