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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a textbox background

Status
Not open for further replies.

jminn0311

Technical User
Jan 7, 2004
66
US
How can you format the background color of a textbox if a certain condition is met? Like a checkbox is checked true so the background of a textbox on the same form needs to be a certain color in that condition.

Thank you,

Jeff M.
 
Check out the conditional formatting in the format menu (2000+ version). Use the "Expression is" in the first dropdown, enter your expression, format...

Roy-Vidar
 
On the on current event of the form:
If Me.MyCheck = 0 Then
Me.MyText.BackColor = RGB(155, 155, 155)
Else
Me.MyText.BackColor = RGB(0, 0, 0)
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top