dmaytum
I'm not sure when you want to make the change, but here is an example...
Say you have a text box called txtMyText and a check box called chkMyCheck that has a label called lblMyCheck. On the AfterUpdate event you could change the caption for the label attached to chkMyCheck.
Code:
If Me.txtMyText = [COLOR=blue] whatever value[/color] Then
Me.lblMyCheck.Caption = [COLOR=red] whatever you want[/color]
Else
Me.lblMyCheck.Caption = [COLOR=red]some other value[/color]
End If
Do you mean you wish to find the name of the label associated with the control?
Code:
'If the label does not exist, you will get an error.
On Error Resume Next
Dim frm As Form
Set frm = Forms!frmForm
strCaption=frm(frm.Check0.Controls(0).Name).Caption
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.