Control Name

  • Thread starter Thread starter Dib
  • Start date Start date
D

Dib

Hi,

I have a form that has about 20 check boxes, I need to get the name of each
check box when the check box got the focus, and also is it possible to
change the caption of the Label attached to the check box?
Can someone please advice on how to do that.

Thanks
Dib
 
Yes, it is possible to change the caption of the label. You would use the name of the
label in code similar to

Me.lblLabelName.Caption = "New Caption"

You can name the labels in such a way, that you will know which label goes with which
control. By default they are just named Label1, Label2, etc.

To get the name of the control with the focus:

Me.ActiveControl.Name
 
Thanks Wayne
Dib
Wayne Morgan said:
Yes, it is possible to change the caption of the label. You would use the name of the
label in code similar to

Me.lblLabelName.Caption = "New Caption"

You can name the labels in such a way, that you will know which label goes with which
control. By default they are just named Label1, Label2, etc.

To get the name of the control with the focus:

Me.ActiveControl.Name
 
Back
Top