Stuart McLachlan
stuart at lexacorp.com.pg
Wed Mar 30 18:16:17 CST 2005
On 30 Mar 2005 at 18:07, Gregg wrote: > If you have a Text Box with an attached Label is there some way to find the Label Text when you only know the Text Box Name? > -- Simplest way is to use a standard naming convention for controls such as always name the label the same as the textbox, but with a different prefix. so txtMyFirstTextBox would have a label called lblMyFirstTextBox. Then the label's name will always be "lbl" & mid$(me.name,4). Otherwise you have to step through the controls collection of the form and check all the labels, looking for the one who's "parent" property is txtMyFirstTextBox -- Stuart