Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Associated Label on GotFocus 2

Status
Not open for further replies.

jmstarbuck

Programmer
Aug 11, 2003
90
US
Hi all,

In my forms I generally change the backcolor of a control when it gets focus. However, that doesn't work for checkboxes so I would like to make the label associated with the control that just got focus bold.

I can't find a way to refer to the associated label. Any ideas?

Best,
Janice
 
Me![name of checkbox control].Controls(0).BackColor

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for your speedy response!

This is what I tried:

Code:
Private Sub DisabilityHO1_GotFocus()
    Me![DisabilityHO1].Controls(0).BackColor = cYellow
End Sub

I get error 2467 "The expression you entered refers to an object that is closed or doesn't exist."

Thoughts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top