Reading Label Name Property (1 Viewer)

kirkm

Registered User.
Local time
Today, 19:03
Joined
Oct 30, 2008
Messages
1,257
In text Box Properties under Other there is a entry for Label Name.
What would be the command to get that name in code ? Once I have that I presume I'll be able to read it's caption ?
Thanks for any help.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 17:03
Joined
Jan 20, 2009
Messages
12,852
Code:
textboxname.Controls(0).Name

textboxname.Controls(0).Caption
 

kirkm

Registered User.
Local time
Today, 19:03
Joined
Oct 30, 2008
Messages
1,257
Thanks, but my problem could be how I get textboxname, which is
Me!subForm1.Form.ActiveControl.Name.Controls(0).Caption
returns error 424 Object required
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 17:03
Joined
Jan 20, 2009
Messages
12,852
Me!subform1.Form.ActiveControl.Controls(0).Caption
 

kirkm

Registered User.
Local time
Today, 19:03
Joined
Oct 30, 2008
Messages
1,257
Brilliant, many thanks, that did it.
 

Users who are viewing this thread

Top Bottom