Often a label control is bound to a textbox or similar other control. I know that there is a way to access the label through code, but I do not remember how to do it.
Can anyone help?
Maybe something like:
Me.txtName.Child!lblName.Value
Or
Me.txtName.Parent!lblName.Value
I will use this when I am enumerating through the controls on a form for validation purposes. Then I want to use the label for a control as information in the error message to show the user where the error is.
A label can be attached to another control. When you create a text box, for example, it has an attached label that displays a caption for that text box.
Control Label and Private Label A Control Label is one where the alcohol brand is owned and controlled by the supplier but is dedicated to one specific retail account. In this case, the product is manufactured according to the specifications of the retailer.
With the textbox you can try
Text0.Controls.Item(0).Caption
where Control 0 is the linked label
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With