UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
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


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

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 4,572 times.  This page was last modified 11:39, 14 February 2012 by Jack Leach. Contributions by Ace  Disclaimers