[Controls] Detect Autolabel

  • Thread starter Thread starter ALESSANDRO Baraldi
  • Start date Start date
A

ALESSANDRO Baraldi

Hi and good Saturday Night.

Some one know how to detect if a Control(TextBox or ListBox or combo)
have a AutoLabel associated...?

I need to know for each one if and wich label is associated....!

This property is a defaultControl property setting, so i think is not
possible to change if we are not on Design view...., but i need
onli to read it....!

Thank for each suggestion.
 
ALESSANDRO Baraldi said:
Hi and good Saturday Night.

Some one know how to detect if a Control(TextBox or ListBox or combo)
have a AutoLabel associated...?

I need to know for each one if and wich label is associated....!

This property is a defaultControl property setting, so i think is not
possible to change if we are not on Design view...., but i need
onli to read it....!

Thank for each suggestion.

[AUTO REPLAY]

On the Parent property of Label if is Associated i point
to the Control directly...., so in Name property i check for the
Control Name.
To check if Control have an associated Label i point to
Controls(0).ControlType

Bye
 
ALESSANDRO said:
Hi and good Saturday Night.

Some one know how to detect if a Control(TextBox or ListBox or combo)
have a AutoLabel associated...?

I need to know for each one if and wich label is associated....!

This property is a defaultControl property setting, so i think is not
possible to change if we are not on Design view...., but i need
onli to read it....!


You can refer to txtbox.Controls(0).Name to get the name of
the attached label, if it exists. If there is no attached
label, trap error 2467.
 
Marshall Barton said:
You can refer to txtbox.Controls(0).Name to get the name of
the attached label, if it exists. If there is no attached
label, trap error 2467.


Many Thanks for replay, is the same solution that i find
i really check for ControlType=acLabel but is the same...!

Bye.
 
ALESSANDRO said:
Many Thanks for replay, is the same solution that i find
i really check for ControlType=acLabel but is the same...!


Sure. The error will occur for a reference to any property.
I just thought you wanted the name if the label did happen
to exist, so if you don't get an error, you already have the
label's name.
 
Back
Top